From 99606f38316902e7dc51fb9915e2d501150aca70 Mon Sep 17 00:00:00 2001 From: Michael Kauzmann Date: Thu, 22 Jun 2023 14:40:56 -0600 Subject: [PATCH] add isDisposable, and assertNotDisposable, https://github.com/phetsims/axon/issues/436 --- js/nodes/Node.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/js/nodes/Node.ts b/js/nodes/Node.ts index fe8febd7e..cfb922f85 100644 --- a/js/nodes/Node.ts +++ b/js/nodes/Node.ts @@ -255,7 +255,9 @@ const NODE_OPTION_KEYS = [ 'touchArea', // Changes the area touches can interact with, see setTouchArea() for more documentation 'clipArea', // Makes things outside of a shape invisible, see setClipArea() for more documentation 'transformBounds', // Flag that makes bounds tighter, see setTransformBounds() for more documentation - ...REQUIRES_BOUNDS_OPTION_KEYS + ...REQUIRES_BOUNDS_OPTION_KEYS, + + 'isDisposable' // From Disposable, see Disposable.isDisposable ]; const DEFAULT_OPTIONS = { @@ -367,6 +369,8 @@ export type NodeOptions = { visiblePropertyOptions?: PropertyOptions; enabledPropertyOptions?: PropertyOptions; inputEnabledPropertyOptions?: PropertyOptions; + + isDisposable?: boolean; // See Disposable.isDisposable } & ParallelDOMOptions & NodeTransformOptions; type RasterizedOptions = {