util.ts (angular-11.0.1) | : | util.ts (angular-11.0.2) | ||
---|---|---|---|---|
skipping to change at line 58 | skipping to change at line 58 | |||
return node; | return node; | |||
} | } | |||
if ((ts.isShorthandPropertyAssignment(propertyToMigrate) && | if ((ts.isShorthandPropertyAssignment(propertyToMigrate) && | |||
propertyToMigrate.objectAssignmentInitializer?.kind === ts.SyntaxKind.Tru eKeyword) || | propertyToMigrate.objectAssignmentInitializer?.kind === ts.SyntaxKind.Tru eKeyword) || | |||
(ts.isPropertyAssignment(propertyToMigrate) && | (ts.isPropertyAssignment(propertyToMigrate) && | |||
propertyToMigrate.initializer.kind === ts.SyntaxKind.TrueKeyword)) { | propertyToMigrate.initializer.kind === ts.SyntaxKind.TrueKeyword)) { | |||
return ts.updateObjectLiteral( | return ts.updateObjectLiteral( | |||
node, | node, | |||
propertiesToKeep.concat( | propertiesToKeep.concat( | |||
ts.createPropertyAssignment('queryParamsHandler', ts.createIdentifie r(`'preserve'`)))); | ts.createPropertyAssignment('queryParamsHandling', ts.createIdentifi er(`'preserve'`)))); | |||
} | } | |||
return ts.updateObjectLiteral(node, propertiesToKeep); | return ts.updateObjectLiteral(node, propertiesToKeep); | |||
} | } | |||
export function findLiteralsToMigrate(sourceFile: ts.SourceFile, typeChecker: ts .TypeChecker) { | export function findLiteralsToMigrate(sourceFile: ts.SourceFile, typeChecker: ts .TypeChecker) { | |||
const results = new Map<string, Set<ts.ObjectLiteralExpression>>( | const results = new Map<string, Set<ts.ObjectLiteralExpression>>( | |||
Array.from(methodConfig.keys(), key => [key, new Set()])); | Array.from(methodConfig.keys(), key => [key, new Set()])); | |||
const routerImport = getImportSpecifier(sourceFile, '@angular/router', 'Router '); | const routerImport = getImportSpecifier(sourceFile, '@angular/router', 'Router '); | |||
const seenLiterals = new Map<ts.ObjectLiteralExpression, string>(); | const seenLiterals = new Map<ts.ObjectLiteralExpression, string>(); | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added |