source: trip-planner-front/node_modules/@angular/compiler-cli/src/ngtsc/typecheck/src/ts_util.d.ts@ 6a3a178

Last change on this file since 6a3a178 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 2.4 KB
Line 
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/compiler-cli/src/ngtsc/typecheck/src/ts_util" />
9import * as ts from 'typescript';
10import { ClassDeclaration } from '../../reflection';
11export declare function tsCastToAny(expr: ts.Expression): ts.Expression;
12/**
13 * Create an expression which instantiates an element by its HTML tagName.
14 *
15 * Thanks to narrowing of `document.createElement()`, this expression will have its type inferred
16 * based on the tag name, including for custom elements that have appropriate .d.ts definitions.
17 */
18export declare function tsCreateElement(tagName: string): ts.Expression;
19/**
20 * Create a `ts.VariableStatement` which declares a variable without explicit initialization.
21 *
22 * The initializer `null!` is used to bypass strict variable initialization checks.
23 *
24 * Unlike with `tsCreateVariable`, the type of the variable is explicitly specified.
25 */
26export declare function tsDeclareVariable(id: ts.Identifier, type: ts.TypeNode): ts.VariableStatement;
27/**
28 * Creates a `ts.TypeQueryNode` for a coerced input.
29 *
30 * For example: `typeof MatInput.ngAcceptInputType_value`, where MatInput is `typeName` and `value`
31 * is the `coercedInputName`.
32 *
33 * @param typeName The `EntityName` of the Directive where the static coerced input is defined.
34 * @param coercedInputName The field name of the coerced input.
35 */
36export declare function tsCreateTypeQueryForCoercedInput(typeName: ts.EntityName, coercedInputName: string): ts.TypeQueryNode;
37/**
38 * Create a `ts.VariableStatement` that initializes a variable with a given expression.
39 *
40 * Unlike with `tsDeclareVariable`, the type of the variable is inferred from the initializer
41 * expression.
42 */
43export declare function tsCreateVariable(id: ts.Identifier, initializer: ts.Expression): ts.VariableStatement;
44/**
45 * Construct a `ts.CallExpression` that calls a method on a receiver.
46 */
47export declare function tsCallMethod(receiver: ts.Expression, methodName: string, args?: ts.Expression[]): ts.CallExpression;
48export declare function checkIfClassIsExported(node: ClassDeclaration): boolean;
49export declare function checkIfGenericTypesAreUnbound(node: ClassDeclaration<ts.ClassDeclaration>): boolean;
50export declare function isAccessExpression(node: ts.Node): node is ts.ElementAccessExpression | ts.PropertyAccessExpression;
Note: See TracBrowser for help on using the repository browser.