import { Component , QWidget } from '@nodegui/nodegui' ; param widget export function recursiveDestroy ( component ) { const widget = component as QWidget ; widget . native . destroyed = true ; widget . nodeChildren . forEach ( recursiveDestroy ) ; if ( widget . layout ) { widget . layout . nodeChildren . forEach ( recursiveDestroy ) ; } }