Skip to content

BooleanProperty

Under Construction

This documentation is auto-generated, and is a work in progress. Please see the source code at https://github.com/phetsims/axon/blob/main/js/BooleanProperty.ts for the most up-to-date information.

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.