diff --git a/js/Enumeration.ts b/js/Enumeration.ts index fb59077..b82028d 100644 --- a/js/Enumeration.ts +++ b/js/Enumeration.ts @@ -25,12 +25,12 @@ * @author Michael Kauzmann (PhET Interactive Simulations) */ -import phetCore from './phetCore.js'; -import TEnumeration from './TEnumeration.js'; import EnumerationValue from './EnumerationValue.js'; import inheritance from './inheritance.js'; -import Constructor from './types/Constructor.js'; import optionize from './optionize.js'; +import phetCore from './phetCore.js'; +import TEnumeration from './TEnumeration.js'; +import Constructor from './types/Constructor.js'; export type EnumerationOptions = { phetioDocumentation?: string; diff --git a/js/EnumerationValue.ts b/js/EnumerationValue.ts index e9c15bc..2e6f621 100644 --- a/js/EnumerationValue.ts +++ b/js/EnumerationValue.ts @@ -26,8 +26,8 @@ * @author Michael Kauzmann (PhET Interactive Simulations) */ -import phetCore from './phetCore.js'; import Enumeration from './Enumeration.js'; +import phetCore from './phetCore.js'; import Constructor from './types/Constructor.js'; class EnumerationValue { diff --git a/js/MipmapElement.ts b/js/MipmapElement.ts index ddc2977..1fff7cd 100644 --- a/js/MipmapElement.ts +++ b/js/MipmapElement.ts @@ -1,7 +1,7 @@ // Copyright 2022-2024, University of Colorado Boulder -import phetCore from './phetCore.js'; import asyncLoader from './asyncLoader.js'; +import phetCore from './phetCore.js'; /** * Size and raster data for levels in a mipmap. See also type Mipmap in Imageable.ts. Defined in phet-core instead of diff --git a/js/Orientation.ts b/js/Orientation.ts index 916dd14..dae1bb4 100644 --- a/js/Orientation.ts +++ b/js/Orientation.ts @@ -7,9 +7,9 @@ * @author Sam Reid (PhET Interactive Simulations) */ -import phetCore from './phetCore.js'; import Enumeration from './Enumeration.js'; import EnumerationValue from './EnumerationValue.js'; +import phetCore from './phetCore.js'; import Constructor from './types/Constructor.js'; import IntentionalAny from './types/IntentionalAny.js'; @@ -74,23 +74,23 @@ class Orientation extends EnumerationValue { public opposite: Orientation; public constructor( coordinate: 'x' | 'y', - centerCoordinate: 'centerX' | 'centerY', - minCoordinate: 'minX' | 'minY', - maxCoordinate: 'maxX' | 'maxY', - minSide: 'left' | 'top', - maxSide: 'right' | 'bottom', - minSize: 'minWidth' | 'minHeight', - maxSize: 'maxWidth' | 'maxHeight', - rectCoordinate: 'rectX' | 'rectY', - rectSize: 'rectWidth' | 'rectHeight', - flowBoxOrientation: 'horizontal' | 'vertical', - size: 'width' | 'height', - line: 'column' | 'row', - preferredSize: 'preferredWidth' | 'preferredHeight', - localPreferredSize: 'localPreferredWidth' | 'localPreferredHeight', - sizable: 'widthSizable' | 'heightSizable', - modelToView: ( m: MVT, n: number ) => number, - viewToModel: ( m: MVT, n: number ) => number, toVector: ( n: number, m: number, VectorType: new ( x: number, y: number, ...args: IntentionalAny[] ) => T ) => T ) { + centerCoordinate: 'centerX' | 'centerY', + minCoordinate: 'minX' | 'minY', + maxCoordinate: 'maxX' | 'maxY', + minSide: 'left' | 'top', + maxSide: 'right' | 'bottom', + minSize: 'minWidth' | 'minHeight', + maxSize: 'maxWidth' | 'maxHeight', + rectCoordinate: 'rectX' | 'rectY', + rectSize: 'rectWidth' | 'rectHeight', + flowBoxOrientation: 'horizontal' | 'vertical', + size: 'width' | 'height', + line: 'column' | 'row', + preferredSize: 'preferredWidth' | 'preferredHeight', + localPreferredSize: 'localPreferredWidth' | 'localPreferredHeight', + sizable: 'widthSizable' | 'heightSizable', + modelToView: ( m: MVT, n: number ) => number, + viewToModel: ( m: MVT, n: number ) => number, toVector: ( n: number, m: number, VectorType: new ( x: number, y: number, ...args: IntentionalAny[] ) => T ) => T ) { super(); this.coordinate = coordinate; diff --git a/js/Pool.ts b/js/Pool.ts index 1c12eeb..6ed236d 100644 --- a/js/Pool.ts +++ b/js/Pool.ts @@ -11,11 +11,11 @@ * * With this style of pooling, the following should be standard boilerplate within the class: - public freeToPool(): void { - MyType.pool.freeToPool( this ); - } + public freeToPool(): void { + MyType.pool.freeToPool( this ); + } - public static readonly pool = new Pool( MyType ); + public static readonly pool = new Pool( MyType ); * and can additionally implement TPoolable to make it clear that the type is pooled * @@ -50,9 +50,9 @@ type SelfPoolableOptions = { export type PoolableOptions = SelfPoolableOptions & ( InstanceType extends { initialize: PoolableInitializer } ? unknown : { - // Require initialize if our type doesn't have a compatible initialize method. - initialize: PoolableInitializer; - } ); + // Require initialize if our type doesn't have a compatible initialize method. + initialize: PoolableInitializer; +} ); type PoolableInitializer = ( ...args: ConstructorParameters ) => InstanceType; export type TPoolable = { diff --git a/js/Poolable.ts b/js/Poolable.ts index c378579..04439cc 100644 --- a/js/Poolable.ts +++ b/js/Poolable.ts @@ -10,10 +10,10 @@ * @author Jonathan Olson */ -import Constructor from './types/Constructor.js'; import extend from './extend.js'; -import phetCore from './phetCore.js'; import optionize from './optionize.js'; +import phetCore from './phetCore.js'; +import Constructor from './types/Constructor.js'; import IntentionalAny from './types/IntentionalAny.js'; type PoolableOptions = { diff --git a/js/assertHasProperties.ts b/js/assertHasProperties.ts index a25d058..3707bdc 100644 --- a/js/assertHasProperties.ts +++ b/js/assertHasProperties.ts @@ -15,8 +15,8 @@ */ import inheritance from './inheritance.js'; -import IntentionalAny from './types/IntentionalAny.js'; import phetCore from './phetCore.js'; +import IntentionalAny from './types/IntentionalAny.js'; const assertHasProperties = ( object: IntentionalAny, properties: string[] ): void => { if ( assert && object ) { diff --git a/js/optionize.ts b/js/optionize.ts index b868ae0..b39a160 100644 --- a/js/optionize.ts +++ b/js/optionize.ts @@ -15,11 +15,11 @@ * @author Michael Kauzmann (PhET Interactive Simulations) */ -import phetCore from './phetCore.js'; import merge from './merge.js'; +import phetCore from './phetCore.js'; import IntentionalAny from './types/IntentionalAny.js'; -import RequiredKeys from './types/RequiredKeys.js'; import OptionalKeys from './types/OptionalKeys.js'; +import RequiredKeys from './types/RequiredKeys.js'; // Gets the parts of an object that are optional type Options = Pick>;