Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public onUnload(lambda: Lambda) {
this.subscribers.onUnload.push(lambda)
return Comlink.proxyValue(() => pull(this.subscribers.onUnload, lambda))
}
public async getOutlineShellProxy() {
if (this.outlineShell) return Comlink.proxyValue(this.outlineShell)
return null
}
public onUpdate(lambda: Lambda) {
this.subscribers.onUpdate.push(lambda)
return Comlink.proxyValue(() => pull(this.subscribers.onUpdate, lambda))
}
public onChange(subscriber: OutlineChangeSubscriber) {
this.subscribers.push(subscriber)
return Comlink.proxyValue(() => pull(this.subscribers, subscriber))
}
public onLoad(lambda: Lambda) {
this.subscribers.onLoad.push(lambda)
if (this.outline) {
this.invokeSubscribers("onLoad")
}
return Comlink.proxyValue(() => pull(this.subscribers.onLoad, lambda))
}
public async getOutlineVisitState() {
if (this.outlineVisitState) return Comlink.proxyValue(this.outlineVisitState)
return null
}