Skip to content

Commit ca10cc4

Browse files
crisbetommalerba
authored andcommitted
refactor(material/schematics): clean up workaround for TS 4.5 (#24115)
Cleans up a temporary workaround that was used to land support for TS 4.5. (cherry picked from commit 05efadb)
1 parent 7092f5f commit ca10cc4

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/material/schematics/ng-update/migrations/hammer-gestures-v9/import-manager.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -358,8 +358,7 @@ export class ImportManager {
358358
// update the named bindings to not re-print the whole import (which could
359359
// cause unnecessary formatting changes)
360360
if (hasFlag(importData, ImportState.ADDED)) {
361-
// TODO(crisbeto): needs to be cast to any until g3 is updated to TS 4.5.
362-
const updatedImport = (ts.updateImportDeclaration as any)(
361+
const updatedImport = ts.updateImportDeclaration(
363362
importData.node,
364363
undefined,
365364
undefined,
@@ -536,6 +535,6 @@ function createImportSpecifier(
536535
name: ts.Identifier,
537536
): ts.ImportSpecifier {
538537
return PARSED_TS_VERSION > 4.4
539-
? (ts.createImportSpecifier as any)(false, propertyName, name)
538+
? ts.createImportSpecifier(false, propertyName, name)
540539
: (ts.createImportSpecifier as any)(propertyName, name);
541540
}

0 commit comments

Comments
 (0)