File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -5,9 +5,9 @@ export default function addAsAnyToObjectLiterals(oldSource: string): string {
55 return function transform ( rootNode : T ) {
66 function visit ( node : ts . Node ) : ts . Node {
77 if ( node . kind === ts . SyntaxKind . ObjectLiteralExpression ) {
8- return ts . createAsExpression (
8+ return ts . factory . createAsExpression (
99 node as ts . Expression ,
10- ts . createTypeReferenceNode ( "any" , [ ] )
10+ ts . factory . createTypeReferenceNode ( "any" , [ ] )
1111 ) ;
1212 }
1313 return ts . visitEachChild ( node , visit , context ) ;
@@ -27,7 +27,7 @@ export default function addAsAnyToObjectLiterals(oldSource: string): string {
2727 const result = ts . transform ( source , [ transformer ] ) ;
2828
2929 const printer : ts . Printer = ts . createPrinter ( {
30- newLine : ts . NewLineKind . LineFeed
30+ newLine : ts . NewLineKind . LineFeed ,
3131 } ) ;
3232 return printer . printFile ( result . transformed [ 0 ] as ts . SourceFile ) ;
3333}
You can’t perform that action at this time.
0 commit comments