On yesterdays Framer JS London meetup we were discussing that pointing to sublayers can be painful thing:) So I found a way to do it with "dot" -
layerA = new Layer
layerA.layerB=layerB = new Layer superLayer:layerA
Of course this is no news for people who actually knows what they are doing with coffescript:) But for me it was a big discovery.
Just make sure never to name your layers anything that also happens to be a Layer property (there are lots) :) To check, you can console.log(layerA) and see everything that comes up.
Or just store it in the custom property. ;)
Yeah you have to insert custom in there. It's a bit safer.