Skip to content

Commit

Permalink
Convert CCKCCheckbox to TypeScript , see phetsims/circuit-constructio…
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Oct 15, 2021
1 parent 35ea48c commit 08412d5
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions phet-types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@
declare var assert: undefined | ( ( x: any, s?: string ) => void );
declare var phet: any;

// Placeholder for scenery node options until we can use TypeScript in common code
// Placeholder until we can use TypeScript in common code
type PhetioObjectOptions = {
tandem: Tandem,
phetioDynamicElement: boolean,
phetioType: IOType
};

// Placeholder until we can use TypeScript in common code
declare type NodeOptions = {

children: Node[],
Expand Down Expand Up @@ -69,7 +76,7 @@ declare type NodeOptions = {
touchArea: Bounds2 | Shape | null,
clipArea: Shape | null,
transformBounds: boolean,
};
} & PhetioObjectOptions;

// Placeholder until we can use TypeScript in common code
class ObservableArray<T> extends Array<T> {
Expand All @@ -93,15 +100,10 @@ class ObservableArray<T> extends Array<T> {
clear() {}
}

// Placeholder until we can use TypeScript in common code
type PhetioObjectOptions = {
tandem: Tandem,
phetioDynamicElement: boolean,
phetioType: IOType
};

// Placeholder until we can use TypeScript in common code
type AccordionBoxOptions = {
titleAlignX: 'left' | 'right' | 'center',
titleXSpacing: number
};
} & NodeOptions;

type CheckboxOptions = {} & NodeOptions;

0 comments on commit 08412d5

Please sign in to comment.