Skip to content

BooleanProperty

Overview

Property whose value must be true or false. Truthy/falsy values are invalid.

@author Sam Reid (PhET Interactive Simulations) @author Chris Malley (PixelZoom, Inc.)

Class BooleanProperty

import { BooleanProperty } from 'scenerystack/axon';

Constructor

new BooleanProperty( value : boolean, providedOptions? : BooleanPropertyOptions )

Instance Methods

toggle()

Type BooleanPropertyOptions

client cannot specify superclass options that are controlled by BooleanProperty

import type { BooleanPropertyOptions } from 'scenerystack/axon';

StrictOmit<PropertyOptions<boolean>, "isValidValue" | "valueType" | "phetioValueType">

Source Code

See the source for BooleanProperty.ts in the axon repository.