kevgski 
const sketch = require('sketch')
var document = sketch.getSelectedDocument()
var page = document.selectedPage.name
var parent = document.getLayersNamed("parent")
var child = document.getLayersNamed("child")
parent.style.fills = []
var newTint = {
color: "#008599",
fillType: sketch.Style.FillType.Color
}
child.style.fills = [newTint]
I get the following result.
TypeError: undefined is not an object (evaluating 'parent.style.fills = []')
at onRun (/Users/yann/Library/Application Support/com.bohemiancoding.sketch3/Plugins/Untitled.sketchplugin:9:13)
Script executed in 0.086281s
I want to change the child layer's color to the parent layer's color and delete the parent's color