How to run a resource before destroy in cdktf

I would like to run a resource before destroying a resource in cdktf.

im creating onprem k3s nodes from a node list variable.

When i remove a node from list i would like to remove it from k3s cluster as well.

In hcl i can do a remote-exec when=destroy provisioner null resource.

How do i do this in cdktf typescript ?