Comment Comment by mst Oh my word. const defer = f => ({ [Symbol.dispose]: f }) using defer(() => cleanup()) That only just occurred to me. To everybody else who finds it completely obvious, "well done" but it seemed worthy of mention nonetheless. parent mst 1 year ago