Skip to content

Commit

Permalink
Converting DerivedProperty/Multilink to properly parameterized TypeSc…
Browse files Browse the repository at this point in the history
…ript, and usage of IReadOnlyProperty. See phetsims/axon#371
  • Loading branch information
jonathanolson committed Dec 8, 2021
1 parent 4cf0ad3 commit 527e11b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions js/util/IColor.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2021, University of Colorado Boulder

import IProperty from '../../../axon/js/IProperty.js';
import IReadOnlyProperty from '../../../axon/js/IReadOnlyProperty.js';
import { Color } from '../imports.js';

/**
Expand All @@ -9,6 +9,6 @@ import { Color } from '../imports.js';
* @author Jonathan Olson <[email protected]>
*/

type IColor = IProperty<Color | string | null> | IProperty<Color | string> | IProperty<Color> | Color | string | null;
type IColor = IReadOnlyProperty<Color | string | null> | IReadOnlyProperty<Color | string> | IReadOnlyProperty<Color> | Color | string | null;

export default IColor;
6 changes: 3 additions & 3 deletions js/util/IPaint.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// Copyright 2021, University of Colorado Boulder

import IProperty from '../../../axon/js/IProperty.js';
import { Paint, Color } from '../imports.js';
import IReadOnlyProperty from '../../../axon/js/IReadOnlyProperty.js';
import { Color, Paint } from '../imports.js';

/**
* Type representing a PaintDef
*
* @author Jonathan Olson <[email protected]>
*/

type IPaint = Paint | IProperty<Color | string | null> | IProperty<Color | string> | IProperty<Color> | Color | string | null;
type IPaint = Paint | IReadOnlyProperty<Color | string | null> | IReadOnlyProperty<Color | string> | IReadOnlyProperty<Color> | Color | string | null;

export default IPaint;

0 comments on commit 527e11b

Please sign in to comment.