Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixup! feat(core): update schematic to migrate to explicit query timing
Properly handle chained class inheritances
- Loading branch information
1 parent
ad707f9
commit 6ca280d
Showing
4 changed files
with
68 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
packages/core/schematics/migrations/static-queries/typescript/property_name.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
|
||
import * as ts from 'typescript'; | ||
|
||
/** | ||
* Gets the text of the given property name. Returns null if the property | ||
* name couldn't be determined statically. | ||
*/ | ||
export function getPropertyNameText(node: ts.PropertyName): string|null { | ||
if (ts.isIdentifier(node) || ts.isStringLiteralLike(node)) { | ||
return node.text; | ||
} | ||
return null; | ||
} |