Skip to content

Commit

Permalink
remove dots from typeNames, Update studio support for types, phetsims…
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Sep 19, 2019
1 parent 42e091a commit 0a1e2ec
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
3 changes: 2 additions & 1 deletion js/ActionIO.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ define( function( require ) {
ActionIOImpl.documentation = 'Executes when an event occurs.';
ActionIOImpl.events = [ 'emitted' ];
ActionIOImpl.validator = ACTION_IO_VALIDATOR;
ActionIOImpl.typeName = `ActionIO.<${parameterTypes.map( param => param.typeName ).join( ', ' )}>`;
ActionIOImpl.typeName = `ActionIO<${parameterTypes.map( param => param.typeName ).join( ', ' )}>`;
ActionIOImpl.parameterTypes = parameterTypes;
ObjectIO.validateSubtype( ActionIOImpl );

return ActionIOImpl;
Expand Down
2 changes: 1 addition & 1 deletion js/DerivedPropertyIO.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ define( require => {
DerivedPropertyIOImpl.documentation = 'Like PropertyIO, but not settable. Instead it is derived from other DerivedPropertyIO or PropertyIO ' +
'instances';
DerivedPropertyIOImpl.validator = PROPERTY_IO_VALIDATOR;
DerivedPropertyIOImpl.typeName = `DerivedPropertyIO.<${parameterType.typeName}>`;
DerivedPropertyIOImpl.typeName = `DerivedPropertyIO<${parameterType.typeName}>`;

// @public - allow type checking for DerivedPropertyIOImpl
DerivedPropertyIOImpl.outerType = DerivedPropertyIO;
Expand Down
2 changes: 1 addition & 1 deletion js/EmitterIO.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ define( require => {
EmitterIOImpl.documentation = 'Emits when an event occurs and calls added listeners.';
EmitterIOImpl.parameterTypes = parameterTypes;
EmitterIOImpl.validator = EMITTER_IO_VALIDATOR;
EmitterIOImpl.typeName = `EmitterIO.<${parameterTypes.map( param => param.typeName ).join( ', ' )}>`;
EmitterIOImpl.typeName = `EmitterIO<${parameterTypes.map( param => param.typeName ).join( ', ' )}>`;
ObjectIO.validateSubtype( EmitterIOImpl );

return EmitterIOImpl;
Expand Down
5 changes: 3 additions & 2 deletions js/ObservableArrayIO.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,9 @@ define( require => {
ObservableArrayIOImpl.documentation = 'An array that sends notifications when its values have changed.';
ObservableArrayIOImpl.validator = OBSERVABLE_ARRAY_VALIDATOR;
ObservableArrayIOImpl.events = [ 'itemAdded', 'itemRemoved' ];
ObservableArrayIOImpl.typeName = `ObservableArrayIO.<${parameterType.typeName}>`;
ObservableArrayIOImpl.parameterType = parameterType;
ObservableArrayIOImpl.typeName = `ObservableArrayIO<${parameterType.typeName}>`;
ObservableArrayIOImpl.parameterType = parameterType; // TODO: I hope we can get rid of this, https://github.com/phetsims/phet-io/issues/1371
ObservableArrayIOImpl.parameterTypes = [ parameterType];
ObjectIO.validateSubtype( ObservableArrayIOImpl );

return ObservableArrayIOImpl;
Expand Down
5 changes: 3 additions & 2 deletions js/PropertyIO.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,9 @@ define( require => {
PropertyIOImpl.methodOrder = [ 'link', 'lazyLink' ];
PropertyIOImpl.validator = { valueType: Property };
PropertyIOImpl.events = [ 'changed' ];
PropertyIOImpl.typeName = `PropertyIO.<${parameterType.typeName}>`;
PropertyIOImpl.parameterType = parameterType;
PropertyIOImpl.typeName = `PropertyIO<${parameterType.typeName}>`;
PropertyIOImpl.parameterType = parameterType; // TODO: I hope we can get rid of this, https://github.com/phetsims/phet-io/issues/1371
PropertyIOImpl.parameterTypes = [ parameterType];
ObjectIO.validateSubtype( PropertyIOImpl );

return PropertyIOImpl;
Expand Down

0 comments on commit 0a1e2ec

Please sign in to comment.