@@ -52,18 +52,18 @@ export class ArgSerializer {
5252 function readValue ( type : Type ) : TypedValue {
5353 // TODO: Use matchers.
5454
55- if ( type . hasJavascriptConstructor ( OptionalType . name ) ) {
55+ if ( type . hasExactClass ( OptionalType . ClassName ) ) {
5656 let typedValue = readValue ( type . getFirstTypeParameter ( ) ) ;
5757 return new OptionalValue ( type , typedValue ) ;
58- } else if ( type . hasJavascriptConstructor ( VariadicType . name ) ) {
58+ } else if ( type . hasExactClass ( VariadicType . ClassName ) ) {
5959 let typedValues = [ ] ;
6060
6161 while ( ! hasReachedTheEnd ( ) ) {
6262 typedValues . push ( readValue ( type . getFirstTypeParameter ( ) ) ) ;
6363 }
6464
6565 return new VariadicValue ( type , typedValues ) ;
66- } else if ( type . hasJavascriptConstructor ( CompositeType . name ) ) {
66+ } else if ( type . hasExactClass ( CompositeType . ClassName ) ) {
6767 let typedValues = [ ] ;
6868
6969 for ( const typeParameter of type . getTypeParameters ( ) ) {
@@ -132,17 +132,17 @@ export class ArgSerializer {
132132 function handleValue ( value : TypedValue ) : void {
133133 // TODO: Use matchers.
134134
135- if ( value . hasJavascriptConstructor ( OptionalValue . name ) ) {
135+ if ( value . hasExactClass ( OptionalValue . ClassName ) ) {
136136 let valueAsOptional = < OptionalValue > value ;
137137 if ( valueAsOptional . isSet ( ) ) {
138138 handleValue ( valueAsOptional . getTypedValue ( ) ) ;
139139 }
140- } else if ( value . hasJavascriptConstructor ( VariadicValue . name ) ) {
140+ } else if ( value . hasExactClass ( VariadicValue . ClassName ) ) {
141141 let valueAsVariadic = < VariadicValue > value ;
142142 for ( const item of valueAsVariadic . getItems ( ) ) {
143143 handleValue ( item ) ;
144144 }
145- } else if ( value . hasJavascriptConstructor ( CompositeValue . name ) ) {
145+ } else if ( value . hasExactClass ( CompositeValue . ClassName ) ) {
146146 let valueAsComposite = < CompositeValue > value ;
147147 for ( const item of valueAsComposite . getItems ( ) ) {
148148 handleValue ( item ) ;
0 commit comments