Last change
on this file since 8d391a1 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
1.3 KB
|
Rev | Line | |
---|
[6a3a178] | 1 | /**
|
---|
| 2 | * @license
|
---|
| 3 | * Copyright Google LLC All Rights Reserved.
|
---|
| 4 | *
|
---|
| 5 | * Use of this source code is governed by an MIT-style license that can be
|
---|
| 6 | * found in the LICENSE file at https://angular.io/license
|
---|
| 7 | */
|
---|
| 8 | /// <amd-module name="@angular/core/schematics/migrations/dynamic-queries/util" />
|
---|
| 9 | import * as ts from 'typescript';
|
---|
| 10 | /**
|
---|
| 11 | * Identifies the nodes that should be migrated by the dynamic
|
---|
| 12 | * queries schematic. Splits the nodes into the following categories:
|
---|
| 13 | * - `removeProperty` - queries from which we should only remove the `static` property of the
|
---|
| 14 | * `options` parameter (e.g. `@ViewChild('child', {static: false, read: ElementRef})`).
|
---|
| 15 | * - `removeParameter` - queries from which we should drop the entire `options` parameter.
|
---|
| 16 | * (e.g. `@ViewChild('child', {static: false})`).
|
---|
| 17 | */
|
---|
| 18 | export declare function identifyDynamicQueryNodes(typeChecker: ts.TypeChecker, sourceFile: ts.SourceFile): {
|
---|
| 19 | removeProperty: ts.ObjectLiteralExpression[];
|
---|
| 20 | removeParameter: ts.CallExpression[];
|
---|
| 21 | };
|
---|
| 22 | /** Removes the `options` parameter from the call expression of a query decorator. */
|
---|
| 23 | export declare function removeOptionsParameter(node: ts.CallExpression): ts.CallExpression;
|
---|
| 24 | /** Removes the `static` property from an object literal expression. */
|
---|
| 25 | export declare function removeStaticFlag(node: ts.ObjectLiteralExpression): ts.ObjectLiteralExpression;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.