22/// <reference path="factory.ts" />
33/// <reference path="utilities.ts" />
44
5- namespace ts {
6-
7-
5+ namespace ts {
86 export const nullTransformationContext : TransformationContext = {
97 enableEmitNotification : noop ,
108 enableSubstitution : noop ,
@@ -265,25 +263,25 @@ namespace ts {
265263 case SyntaxKind . ConstructorType :
266264 case SyntaxKind . CallSignature :
267265 case SyntaxKind . ConstructSignature :
268- return updateSignatureDeclaration ( < SignatureDeclaration > node
269- , nodesVisitor ( ( < SignatureDeclaration > node ) . typeParameters , visitor , isTypeParameter )
270- , visitParameterList ( ( < SignatureDeclaration > node ) . parameters , visitor , context , nodesVisitor )
271- , visitNode ( ( < SignatureDeclaration > node ) . type , visitor , isTypeNode ) ) ;
266+ return updateSignatureDeclaration ( < SignatureDeclaration > node ,
267+ nodesVisitor ( ( < SignatureDeclaration > node ) . typeParameters , visitor , isTypeParameter ) ,
268+ visitParameterList ( ( < SignatureDeclaration > node ) . parameters , visitor , context , nodesVisitor ) ,
269+ visitNode ( ( < SignatureDeclaration > node ) . type , visitor , isTypeNode ) ) ;
272270
273271 case SyntaxKind . MethodSignature :
274- return updateSignatureDeclaration ( < SignatureDeclaration & TypeElement > node
275- , nodesVisitor ( ( < SignatureDeclaration & TypeElement > node ) . typeParameters , visitor , isTypeParameter )
276- , visitParameterList ( ( < SignatureDeclaration & TypeElement > node ) . parameters , visitor , context , nodesVisitor )
277- , visitNode ( ( < SignatureDeclaration & TypeElement > node ) . type , visitor , isTypeNode )
278- , visitNode ( ( < SignatureDeclaration & TypeElement > node ) . name , visitor , isPropertyName )
279- , visitNode ( ( < SignatureDeclaration & TypeElement > node ) . questionToken , visitor , isToken ) ) ;
272+ return updateSignatureDeclaration ( < SignatureDeclaration & TypeElement > node ,
273+ nodesVisitor ( ( < SignatureDeclaration & TypeElement > node ) . typeParameters , visitor , isTypeParameter ) ,
274+ visitParameterList ( ( < SignatureDeclaration & TypeElement > node ) . parameters , visitor , context , nodesVisitor ) ,
275+ visitNode ( ( < SignatureDeclaration & TypeElement > node ) . type , visitor , isTypeNode ) ,
276+ visitNode ( ( < SignatureDeclaration & TypeElement > node ) . name , visitor , isPropertyName ) ,
277+ visitNode ( ( < SignatureDeclaration & TypeElement > node ) . questionToken , visitor , isToken ) ) ;
280278
281279 case SyntaxKind . IndexSignature :
282- return updateIndexSignatureDeclaration ( < IndexSignatureDeclaration > node
283- , visitParameterList ( ( < IndexSignatureDeclaration > node ) . parameters , visitor , context , nodesVisitor )
284- , visitNode ( ( < IndexSignatureDeclaration > node ) . type , visitor , isTypeNode )
285- , nodesVisitor ( ( < IndexSignatureDeclaration > node ) . decorators , visitor , isDecorator )
286- , nodesVisitor ( ( < IndexSignatureDeclaration > node ) . modifiers , visitor , isModifier ) ) ;
280+ return updateIndexSignatureDeclaration ( < IndexSignatureDeclaration > node ,
281+ visitParameterList ( ( < IndexSignatureDeclaration > node ) . parameters , visitor , context , nodesVisitor ) ,
282+ visitNode ( ( < IndexSignatureDeclaration > node ) . type , visitor , isTypeNode ) ,
283+ nodesVisitor ( ( < IndexSignatureDeclaration > node ) . decorators , visitor , isDecorator ) ,
284+ nodesVisitor ( ( < IndexSignatureDeclaration > node ) . modifiers , visitor , isModifier ) ) ;
287285
288286 case SyntaxKind . Parameter :
289287 return updateParameter ( < ParameterDeclaration > node ,
@@ -304,9 +302,9 @@ namespace ts {
304302 case SyntaxKind . TypePredicate :
305303 throw new Error ( "reached unsupported type in visitor." ) ;
306304 case SyntaxKind . TypeReference :
307- return updateTypeReferenceNode ( < TypeReferenceNode > node
308- , visitNode ( ( < TypeReferenceNode > node ) . typeName , visitor , isEntityName )
309- , nodesVisitor ( ( < TypeReferenceNode > node ) . typeArguments , visitor , isTypeNode ) ) ;
305+ return updateTypeReferenceNode ( < TypeReferenceNode > node ,
306+ visitNode ( ( < TypeReferenceNode > node ) . typeName , visitor , isEntityName ) ,
307+ nodesVisitor ( ( < TypeReferenceNode > node ) . typeArguments , visitor , isTypeNode ) ) ;
310308
311309 case SyntaxKind . TypeQuery :
312310 return updateTypeQueryNode ( ( < TypeQueryNode > node ) , visitNode ( ( < TypeQueryNode > node ) . exprName , visitor , isEntityName ) ) ;
@@ -322,8 +320,8 @@ namespace ts {
322320
323321 case SyntaxKind . UnionType :
324322 case SyntaxKind . IntersectionType :
325- return updateUnionOrIntersectionTypeNode ( < UnionOrIntersectionTypeNode > node
326- , nodesVisitor ( ( < UnionOrIntersectionTypeNode > node ) . types , visitor , isTypeNode ) ) ;
323+ return updateUnionOrIntersectionTypeNode ( < UnionOrIntersectionTypeNode > node ,
324+ nodesVisitor ( ( < UnionOrIntersectionTypeNode > node ) . types , visitor , isTypeNode ) ) ;
327325
328326 case SyntaxKind . ParenthesizedType :
329327 throw new Error ( "reached unsupported type in visitor." ) ;
@@ -332,43 +330,43 @@ namespace ts {
332330 case SyntaxKind . TypeOperator :
333331 return updateTypeOperatorNode ( < TypeOperatorNode > node , visitNode ( ( < TypeOperatorNode > node ) . type , visitor , isTypeNode ) ) ;
334332 case SyntaxKind . IndexedAccessType :
335- return updateIndexedAccessTypeNode ( ( < IndexedAccessTypeNode > node )
336- , visitNode ( ( < IndexedAccessTypeNode > node ) . objectType , visitor , isTypeNode )
337- , visitNode ( ( < IndexedAccessTypeNode > node ) . indexType , visitor , isTypeNode ) ) ;
333+ return updateIndexedAccessTypeNode ( ( < IndexedAccessTypeNode > node ) ,
334+ visitNode ( ( < IndexedAccessTypeNode > node ) . objectType , visitor , isTypeNode ) ,
335+ visitNode ( ( < IndexedAccessTypeNode > node ) . indexType , visitor , isTypeNode ) ) ;
338336 case SyntaxKind . MappedType :
339- return updateMappedTypeNode ( ( < MappedTypeNode > node )
340- , visitNode ( ( < MappedTypeNode > node ) . readonlyToken , visitor , isToken )
341- , visitNode ( ( < MappedTypeNode > node ) . typeParameter , visitor , isTypeParameter )
342- , visitNode ( ( < MappedTypeNode > node ) . questionToken , visitor , isToken )
343- , visitNode ( ( < MappedTypeNode > node ) . type , visitor , isTypeNode ) ) ;
337+ return updateMappedTypeNode ( ( < MappedTypeNode > node ) ,
338+ visitNode ( ( < MappedTypeNode > node ) . readonlyToken , visitor , isToken ) ,
339+ visitNode ( ( < MappedTypeNode > node ) . typeParameter , visitor , isTypeParameter ) ,
340+ visitNode ( ( < MappedTypeNode > node ) . questionToken , visitor , isToken ) ,
341+ visitNode ( ( < MappedTypeNode > node ) . type , visitor , isTypeNode ) ) ;
344342
345343 case SyntaxKind . LiteralType :
346- return updateLiteralTypeNode ( < LiteralTypeNode > node
347- , visitNode ( ( < LiteralTypeNode > node ) . literal , visitor , isExpression ) ) ;
344+ return updateLiteralTypeNode ( < LiteralTypeNode > node ,
345+ visitNode ( ( < LiteralTypeNode > node ) . literal , visitor , isExpression ) ) ;
348346
349347 // Type Declarations
350348
351349 case SyntaxKind . TypeParameter :
352- return updateTypeParameterDeclaration ( < TypeParameterDeclaration > node
353- , visitNode ( ( < TypeParameterDeclaration > node ) . name , visitor , isIdentifier )
354- , visitNode ( ( < TypeParameterDeclaration > node ) . constraint , visitor , isTypeNode )
355- , visitNode ( ( < TypeParameterDeclaration > node ) . default , visitor , isTypeNode ) ) ;
350+ return updateTypeParameterDeclaration ( < TypeParameterDeclaration > node ,
351+ visitNode ( ( < TypeParameterDeclaration > node ) . name , visitor , isIdentifier ) ,
352+ visitNode ( ( < TypeParameterDeclaration > node ) . constraint , visitor , isTypeNode ) ,
353+ visitNode ( ( < TypeParameterDeclaration > node ) . default , visitor , isTypeNode ) ) ;
356354
357355 // Type members
358356
359357 case SyntaxKind . PropertySignature :
360- return updatePropertySignature ( ( < PropertySignature > node )
361- , visitNode ( ( < PropertySignature > node ) . name , visitor , isPropertyName )
362- , visitNode ( ( < PropertySignature > node ) . questionToken , visitor , isToken )
363- , visitNode ( ( < PropertySignature > node ) . type , visitor , isTypeNode )
364- , visitNode ( ( < PropertySignature > node ) . initializer , visitor , isExpression ) ) ;
358+ return updatePropertySignature ( ( < PropertySignature > node ) ,
359+ visitNode ( ( < PropertySignature > node ) . name , visitor , isPropertyName ) ,
360+ visitNode ( ( < PropertySignature > node ) . questionToken , visitor , isToken ) ,
361+ visitNode ( ( < PropertySignature > node ) . type , visitor , isTypeNode ) ,
362+ visitNode ( ( < PropertySignature > node ) . initializer , visitor , isExpression ) ) ;
365363
366364 case SyntaxKind . IndexSignature :
367- return updateIndexSignatureDeclaration ( < IndexSignatureDeclaration > node
368- , visitParameterList ( ( < IndexSignatureDeclaration > node ) . parameters , visitor , context , nodesVisitor )
369- , visitNode ( ( < IndexSignatureDeclaration > node ) . type , visitor , isTypeNode )
370- , nodesVisitor ( ( < IndexSignatureDeclaration > node ) . decorators , visitor , isDecorator )
371- , nodesVisitor ( ( < IndexSignatureDeclaration > node ) . modifiers , visitor , isModifier ) ) ;
365+ return updateIndexSignatureDeclaration ( < IndexSignatureDeclaration > node ,
366+ visitParameterList ( ( < IndexSignatureDeclaration > node ) . parameters , visitor , context , nodesVisitor ) ,
367+ visitNode ( ( < IndexSignatureDeclaration > node ) . type , visitor , isTypeNode ) ,
368+ nodesVisitor ( ( < IndexSignatureDeclaration > node ) . decorators , visitor , isDecorator ) ,
369+ nodesVisitor ( ( < IndexSignatureDeclaration > node ) . modifiers , visitor , isModifier ) ) ;
372370
373371 case SyntaxKind . PropertyDeclaration :
374372 return updateProperty ( < PropertyDeclaration > node ,
0 commit comments