@angular/compiler
- Version 19.1.4
- Published
- 4.27 MB
- 1 dependency
- MIT license
Install
npm i @angular/compiler
yarn add @angular/compiler
pnpm add @angular/compiler
Overview
Angular - the compiler library
Index
Variables
Functions
- areAllEquivalent()
- arrowFn()
- compileClassDebugInfo()
- compileClassMetadata()
- compileComponentClassMetadata()
- compileComponentDeclareClassMetadata()
- compileComponentFromMetadata()
- compileDeclareClassMetadata()
- compileDeclareComponentFromMetadata()
- compileDeclareDirectiveFromMetadata()
- compileDeclareFactoryFunction()
- compileDeclareInjectableFromMetadata()
- compileDeclareInjectorFromMetadata()
- compileDeclareNgModuleFromMetadata()
- compileDeclarePipeFromMetadata()
- compileDeferResolverFunction()
- compileDirectiveFromMetadata()
- compileFactoryFunction()
- compileHmrInitializer()
- compileHmrUpdateCallback()
- compileInjectable()
- compileInjector()
- compileNgModule()
- compileOpaqueAsyncClassMetadata()
- compilePipeFromMetadata()
- computeMsgId()
- createCssSelectorFromNode()
- createInjectableType()
- createMayBeForwardRefExpression()
- devOnlyGuardedExpression()
- encapsulateStyle()
- expressionType()
- findMatchingDirectivesAndPipes()
- fn()
- getHtmlTagDefinition()
- getNsPrefix()
- getSafePropertyAccessString()
- identifierName()
- ifStmt()
- importExpr()
- importType()
- isNgContainer()
- isNgContent()
- isNgTemplate()
- isNull()
- jsDocComment()
- leadingComment()
- literal()
- literalArr()
- literalMap()
- localizedString()
- makeBindingParser()
- mergeNsAndName()
- not()
- nullSafeIsEquivalent()
- parseHostBindings()
- parseSelectorToR3Selector()
- parseTemplate()
- preserveWhitespacesDefault()
- publishFacade()
- r3JitTypeSourceSpan()
- sanitizeIdentifier()
- splitNsName()
- taggedTemplate()
- tmplAstVisitAll()
- transplantedType()
- typeofExpr()
- unary()
- variable()
- verifyHostBindings()
- visitAll()
Classes
Expression
- and()
- bigger()
- biggerEquals()
- bitwiseAnd()
- bitwiseOr()
- callFn()
- clone()
- conditional()
- divide()
- equals()
- identical()
- instantiate()
- isBlank()
- isConstant()
- isEquivalent()
- key()
- lower()
- lowerEquals()
- minus()
- modulo()
- multiply()
- notEquals()
- notIdentical()
- nullishCoalesce()
- or()
- plus()
- prop()
- sourceSpan
- toStmt()
- type
- visitExpression()
R3Identifiers
- advance
- attachSourceLocations
- attribute
- attributeInterpolate1
- attributeInterpolate2
- attributeInterpolate3
- attributeInterpolate4
- attributeInterpolate5
- attributeInterpolate6
- attributeInterpolate7
- attributeInterpolate8
- attributeInterpolateV
- ChangeDetectionStrategy
- classMap
- classMapInterpolate1
- classMapInterpolate2
- classMapInterpolate3
- classMapInterpolate4
- classMapInterpolate5
- classMapInterpolate6
- classMapInterpolate7
- classMapInterpolate8
- classMapInterpolateV
- classProp
- ComponentDeclaration
- componentInstance
- conditional
- contentQuery
- contentQuerySignal
- CopyDefinitionFeature
- core
- declareClassMetadata
- declareClassMetadataAsync
- declareComponent
- declareDirective
- declareFactory
- declareInjectable
- declareInjector
- declareLet
- declareNgModule
- declarePipe
- defer
- deferEnableTimerScheduling
- deferHydrateNever
- deferHydrateOnHover
- deferHydrateOnIdle
- deferHydrateOnImmediate
- deferHydrateOnInteraction
- deferHydrateOnTimer
- deferHydrateOnViewport
- deferHydrateWhen
- deferOnHover
- deferOnIdle
- deferOnImmediate
- deferOnInteraction
- deferOnTimer
- deferOnViewport
- deferPrefetchOnHover
- deferPrefetchOnIdle
- deferPrefetchOnImmediate
- deferPrefetchOnInteraction
- deferPrefetchOnTimer
- deferPrefetchOnViewport
- deferPrefetchWhen
- deferWhen
- defineComponent
- defineDirective
- defineInjector
- defineNgModule
- definePipe
- DirectiveDeclaration
- directiveInject
- disableBindings
- element
- elementContainer
- elementContainerEnd
- elementContainerStart
- elementEnd
- elementStart
- enableBindings
- ExternalStylesFeature
- FactoryDeclaration
- FactoryTarget
- forwardRef
- getComponentDepsFactory
- getCurrentView
- getInheritedFactory
- HostDirectivesFeature
- hostProperty
- i18n
- i18nApply
- i18nAttributes
- i18nEnd
- i18nExp
- i18nPostprocess
- i18nStart
- InheritDefinitionFeature
- inject
- InjectableDeclaration
- injectAttribute
- InjectorDeclaration
- InjectorDef
- InputSignalBrandWriteType
- InputTransformsFeatureFeature
- invalidFactory
- invalidFactoryDep
- listener
- loadQuery
- ModuleWithProviders
- namespaceHTML
- namespaceMathML
- namespaceSVG
- NEW_METHOD
- nextContext
- NgModuleDeclaration
- NgOnChangesFeature
- ɵɵdefineInjectable
- PATCH_DEPS
- pipe
- pipeBind1
- pipeBind2
- pipeBind3
- pipeBind4
- pipeBindV
- PipeDeclaration
- projection
- projectionDef
- property
- propertyInterpolate
- propertyInterpolate1
- propertyInterpolate2
- propertyInterpolate3
- propertyInterpolate4
- propertyInterpolate5
- propertyInterpolate6
- propertyInterpolate7
- propertyInterpolate8
- propertyInterpolateV
- ProvidersFeature
- pureFunction0
- pureFunction1
- pureFunction2
- pureFunction3
- pureFunction4
- pureFunction5
- pureFunction6
- pureFunction7
- pureFunction8
- pureFunctionV
- queryAdvance
- queryRefresh
- readContextLet
- reference
- registerNgModuleType
- repeater
- repeaterCreate
- repeaterTrackByIdentity
- repeaterTrackByIndex
- replaceMetadata
- resetView
- resolveBody
- resolveDocument
- resolveForwardRef
- resolveWindow
- restoreView
- sanitizeHtml
- sanitizeResourceUrl
- sanitizeScript
- sanitizeStyle
- sanitizeUrl
- sanitizeUrlOrResourceUrl
- setClassDebugInfo
- setClassMetadata
- setClassMetadataAsync
- setComponentScope
- setNgModuleScope
- storeLet
- styleMap
- styleMapInterpolate1
- styleMapInterpolate2
- styleMapInterpolate3
- styleMapInterpolate4
- styleMapInterpolate5
- styleMapInterpolate6
- styleMapInterpolate7
- styleMapInterpolate8
- styleMapInterpolateV
- styleProp
- stylePropInterpolate1
- stylePropInterpolate2
- stylePropInterpolate3
- stylePropInterpolate4
- stylePropInterpolate5
- stylePropInterpolate6
- stylePropInterpolate7
- stylePropInterpolate8
- stylePropInterpolateV
- syntheticHostListener
- syntheticHostProperty
- templateCreate
- templateRefExtractor
- text
- textInterpolate
- textInterpolate1
- textInterpolate2
- textInterpolate3
- textInterpolate4
- textInterpolate5
- textInterpolate6
- textInterpolate7
- textInterpolate8
- textInterpolateV
- TRANSFORM_METHOD
- trustConstantHtml
- trustConstantResourceUrl
- twoWayBindingSet
- twoWayListener
- twoWayProperty
- UnwrapDirectiveSignalInputs
- unwrapWritableSignal
- validateIframeAttribute
- ViewEncapsulation
- viewQuery
- viewQuerySignal
RecursiveAstVisitor
- visit()
- visitAll()
- visitBinary()
- visitCall()
- visitChain()
- visitConditional()
- visitImplicitReceiver()
- visitInterpolation()
- visitKeyedRead()
- visitKeyedWrite()
- visitLiteralArray()
- visitLiteralMap()
- visitLiteralPrimitive()
- visitNonNullAssert()
- visitPipe()
- visitPrefixNot()
- visitPropertyRead()
- visitPropertyWrite()
- visitSafeCall()
- visitSafeKeyedRead()
- visitSafePropertyRead()
- visitThisReceiver()
- visitTypeofExpression()
- visitUnary()
TmplAstRecursiveVisitor
- visitBoundAttribute()
- visitBoundEvent()
- visitBoundText()
- visitContent()
- visitDeferredBlock()
- visitDeferredBlockError()
- visitDeferredBlockLoading()
- visitDeferredBlockPlaceholder()
- visitDeferredTrigger()
- visitElement()
- visitForLoopBlock()
- visitForLoopBlockEmpty()
- visitIcu()
- visitIfBlock()
- visitIfBlockBranch()
- visitLetDeclaration()
- visitReference()
- visitSwitchBlock()
- visitSwitchBlockCase()
- visitTemplate()
- visitText()
- visitTextAttribute()
- visitUnknownBlock()
- visitVariable()
Interfaces
AstVisitor
- visit()
- visitASTWithSource()
- visitBinary()
- visitCall()
- visitChain()
- visitConditional()
- visitImplicitReceiver()
- visitInterpolation()
- visitKeyedRead()
- visitKeyedWrite()
- visitLiteralArray()
- visitLiteralMap()
- visitLiteralPrimitive()
- visitNonNullAssert()
- visitPipe()
- visitPrefixNot()
- visitPropertyRead()
- visitPropertyWrite()
- visitSafeCall()
- visitSafeKeyedRead()
- visitSafePropertyRead()
- visitThisReceiver()
- visitTypeofExpression()
- visitUnary()
ExpressionVisitor
- visitArrowFunctionExpr()
- visitBinaryOperatorExpr()
- visitCommaExpr()
- visitConditionalExpr()
- visitDynamicImportExpr()
- visitExternalExpr()
- visitFunctionExpr()
- visitInstantiateExpr()
- visitInvokeFunctionExpr()
- visitLiteralArrayExpr()
- visitLiteralExpr()
- visitLiteralMapExpr()
- visitLocalizedString()
- visitNotExpr()
- visitReadKeyExpr()
- visitReadPropExpr()
- visitReadVarExpr()
- visitTaggedTemplateExpr()
- visitTypeofExpr()
- visitUnaryOperatorExpr()
- visitWrappedNodeExpr()
- visitWriteKeyExpr()
- visitWritePropExpr()
- visitWriteVarExpr()
TmplAstVisitor
- visit()
- visitBoundAttribute()
- visitBoundEvent()
- visitBoundText()
- visitContent()
- visitDeferredBlock()
- visitDeferredBlockError()
- visitDeferredBlockLoading()
- visitDeferredBlockPlaceholder()
- visitDeferredTrigger()
- visitElement()
- visitForLoopBlock()
- visitForLoopBlockEmpty()
- visitIcu()
- visitIfBlock()
- visitIfBlockBranch()
- visitLetDeclaration()
- visitReference()
- visitSwitchBlock()
- visitSwitchBlockCase()
- visitTemplate()
- visitText()
- visitTextAttribute()
- visitUnknownBlock()
- visitVariable()
Enums
LexerTokenType
- ATTR_NAME
- ATTR_QUOTE
- ATTR_VALUE_INTERPOLATION
- ATTR_VALUE_TEXT
- BLOCK_CLOSE
- BLOCK_OPEN_END
- BLOCK_OPEN_START
- BLOCK_PARAMETER
- CDATA_END
- CDATA_START
- COMMENT_END
- COMMENT_START
- DOC_TYPE
- ENCODED_ENTITY
- EOF
- ESCAPABLE_RAW_TEXT
- EXPANSION_CASE_EXP_END
- EXPANSION_CASE_EXP_START
- EXPANSION_CASE_VALUE
- EXPANSION_FORM_END
- EXPANSION_FORM_START
- INCOMPLETE_BLOCK_OPEN
- INCOMPLETE_LET
- INCOMPLETE_TAG_OPEN
- INTERPOLATION
- LET_END
- LET_START
- LET_VALUE
- RAW_TEXT
- TAG_CLOSE
- TAG_OPEN_END
- TAG_OPEN_END_VOID
- TAG_OPEN_START
- TEXT
Type Aliases
Namespaces
core
- AttributeMarker
- ChangeDetectionStrategy
- CUSTOM_ELEMENTS_SCHEMA
- emitDistinctChangesOnlyDefaultValue
- HostBinding
- HostListener
- InjectFlags
- Input
- InputFlags
- MissingTranslationStrategy
- NO_ERRORS_SCHEMA
- Output
- parseSelectorToR3Selector()
- R3CssSelector
- R3CssSelectorList
- RenderFlags
- SchemaMetadata
- SecurityContext
- SelectorFlags
- Type
- Type
- ViewEncapsulation
outputAst
- areAllEquivalent()
- ArrayType
- arrowFn()
- ArrowFunctionExpr
- BinaryOperator
- BinaryOperatorExpr
- BOOL_TYPE
- BuiltinType
- BuiltinTypeName
- CommaExpr
- ConditionalExpr
- CookedRawString
- DeclareFunctionStmt
- DeclareVarStmt
- DYNAMIC_TYPE
- DynamicImportExpr
- Expression
- ExpressionStatement
- expressionType()
- ExpressionType
- ExpressionVisitor
- ExternalExpr
- ExternalReference
- fn()
- FnParam
- FUNCTION_TYPE
- FunctionExpr
- ifStmt()
- IfStmt
- importExpr()
- importType()
- INFERRED_TYPE
- InstantiateExpr
- INT_TYPE
- InvokeFunctionExpr
- isNull()
- jsDocComment()
- JSDocComment
- JSDocTag
- JSDocTagName
- leadingComment()
- LeadingComment
- literal()
- literalArr()
- LiteralArrayExpr
- LiteralExpr
- literalMap()
- LiteralMapEntry
- LiteralMapExpr
- LiteralPiece
- localizedString()
- LocalizedString
- MapType
- MessagePiece
- NONE_TYPE
- not()
- NotExpr
- NULL_EXPR
- nullSafeIsEquivalent()
- NUMBER_TYPE
- PlaceholderPiece
- ReadKeyExpr
- ReadPropExpr
- ReadVarExpr
- RecursiveAstVisitor
- ReturnStatement
- Statement
- StatementVisitor
- StmtModifier
- STRING_TYPE
- taggedTemplate()
- TaggedTemplateExpr
- TemplateLiteral
- TemplateLiteralElement
- transplantedType()
- TransplantedType
- Type
- TYPED_NULL_EXPR
- TypeModifier
- typeofExpr()
- TypeofExpr
- TypeVisitor
- unary()
- UnaryOperator
- UnaryOperatorExpr
- variable()
- WrappedNodeExpr
- WriteKeyExpr
- WritePropExpr
- WriteVarExpr
t
- BlockNode
- BoundAttribute
- BoundDeferredTrigger
- BoundEvent
- BoundText
- Comment
- Content
- DeferredBlock
- DeferredBlockError
- DeferredBlockLoading
- DeferredBlockPlaceholder
- DeferredBlockTriggers
- DeferredTrigger
- Element
- ForLoopBlock
- ForLoopBlockEmpty
- HoverDeferredTrigger
- Icu
- IdleDeferredTrigger
- IfBlock
- IfBlockBranch
- ImmediateDeferredTrigger
- InteractionDeferredTrigger
- LetDeclaration
- NeverDeferredTrigger
- Node
- RecursiveVisitor
- Reference
- SwitchBlock
- SwitchBlockCase
- Template
- Text
- TextAttribute
- TimerDeferredTrigger
- UnknownBlock
- Variable
- ViewportDeferredTrigger
- visitAll()
- Visitor
Variables
variable BOOL_TYPE
const BOOL_TYPE: BuiltinType;
variable CUSTOM_ELEMENTS_SCHEMA
const CUSTOM_ELEMENTS_SCHEMA: SchemaMetadata;
variable DEFAULT_INTERPOLATION_CONFIG
const DEFAULT_INTERPOLATION_CONFIG: InterpolationConfig;
variable DYNAMIC_TYPE
const DYNAMIC_TYPE: BuiltinType;
variable emitDistinctChangesOnlyDefaultValue
const emitDistinctChangesOnlyDefaultValue: boolean;
variable EOF
const EOF: Token;
variable FUNCTION_TYPE
const FUNCTION_TYPE: BuiltinType;
variable INFERRED_TYPE
const INFERRED_TYPE: BuiltinType;
variable INT_TYPE
const INT_TYPE: BuiltinType;
variable NO_ERRORS_SCHEMA
const NO_ERRORS_SCHEMA: SchemaMetadata;
variable NONE_TYPE
const NONE_TYPE: BuiltinType;
variable NULL_EXPR
const NULL_EXPR: LiteralExpr;
variable NUMBER_TYPE
const NUMBER_TYPE: BuiltinType;
variable STRING_TYPE
const STRING_TYPE: BuiltinType;
variable Type_2
const Type_2: FunctionConstructor;
variable TYPED_NULL_EXPR
const TYPED_NULL_EXPR: LiteralExpr;
variable VERSION
const VERSION: Version;
Functions
function areAllEquivalent
areAllEquivalent: <T extends { isEquivalent(other: T): boolean }>( base: T[], other: T[]) => boolean;
function arrowFn
arrowFn: ( params: FnParam[], body: Expression | Statement[], type?: Type | null, sourceSpan?: ParseSourceSpan | null) => ArrowFunctionExpr;
function compileClassDebugInfo
compileClassDebugInfo: (debugInfo: R3ClassDebugInfo) => outputAst.Expression;
Generate an ngDevMode guarded call to setClassDebugInfo with the debug info about the class (e.g., the file name in which the class is defined)
function compileClassMetadata
compileClassMetadata: ( metadata: R3ClassMetadata) => outputAst.InvokeFunctionExpr;
function compileComponentClassMetadata
compileComponentClassMetadata: ( metadata: R3ClassMetadata, dependencies: R3DeferPerComponentDependency[] | null) => outputAst.Expression;
Wraps the
setClassMetadata
function with extra logic that dynamically loads dependencies from@defer
blocks.Generates a call like this:
setClassMetadataAsync(type, () => [import('./cmp-a').then(m => m.CmpA);import('./cmp-b').then(m => m.CmpB);], (CmpA, CmpB) => {setClassMetadata(type, decorators, ctorParameters, propParameters);});Similar to the
setClassMetadata
call, it's wrapped into thengDevMode
check to tree-shake away this code in production mode.
function compileComponentDeclareClassMetadata
compileComponentDeclareClassMetadata: ( metadata: R3ClassMetadata, dependencies: R3DeferPerComponentDependency[] | null) => outputAst.Expression;
function compileComponentFromMetadata
compileComponentFromMetadata: ( meta: R3ComponentMetadata<R3TemplateDependency>, constantPool: ConstantPool, bindingParser: BindingParser) => R3CompiledExpression;
Compile a component for the render3 runtime as defined by the
R3ComponentMetadata
.
function compileDeclareClassMetadata
compileDeclareClassMetadata: (metadata: R3ClassMetadata) => outputAst.Expression;
function compileDeclareComponentFromMetadata
compileDeclareComponentFromMetadata: ( meta: R3ComponentMetadata<R3TemplateDependencyMetadata>, template: ParsedTemplate, additionalTemplateInfo: DeclareComponentTemplateInfo) => R3CompiledExpression;
Compile a component declaration defined by the
R3ComponentMetadata
.
function compileDeclareDirectiveFromMetadata
compileDeclareDirectiveFromMetadata: ( meta: R3DirectiveMetadata) => R3CompiledExpression;
Compile a directive declaration defined by the
R3DirectiveMetadata
.
function compileDeclareFactoryFunction
compileDeclareFactoryFunction: (meta: R3FactoryMetadata) => R3CompiledExpression;
function compileDeclareInjectableFromMetadata
compileDeclareInjectableFromMetadata: ( meta: R3InjectableMetadata) => R3CompiledExpression;
Compile a Injectable declaration defined by the
R3InjectableMetadata
.
function compileDeclareInjectorFromMetadata
compileDeclareInjectorFromMetadata: ( meta: R3InjectorMetadata) => R3CompiledExpression;
function compileDeclareNgModuleFromMetadata
compileDeclareNgModuleFromMetadata: ( meta: R3NgModuleMetadata) => R3CompiledExpression;
function compileDeclarePipeFromMetadata
compileDeclarePipeFromMetadata: (meta: R3PipeMetadata) => R3CompiledExpression;
Compile a Pipe declaration defined by the
R3PipeMetadata
.
function compileDeferResolverFunction
compileDeferResolverFunction: ( meta: R3DeferResolverFunctionMetadata) => outputAst.ArrowFunctionExpr;
Compiles the dependency resolver function for a defer block.
function compileDirectiveFromMetadata
compileDirectiveFromMetadata: ( meta: R3DirectiveMetadata, constantPool: ConstantPool, bindingParser: BindingParser) => R3CompiledExpression;
Compile a directive for the render3 runtime as defined by the
R3DirectiveMetadata
.
function compileFactoryFunction
compileFactoryFunction: (meta: R3FactoryMetadata) => R3CompiledExpression;
Construct a factory function expression for the given
R3FactoryMetadata
.
function compileHmrInitializer
compileHmrInitializer: (meta: R3HmrMetadata) => outputAst.Expression;
Compiles the expression that initializes HMR for a class.
Parameter meta
HMR metadata extracted from the class.
function compileHmrUpdateCallback
compileHmrUpdateCallback: ( definitions: { name: string; initializer: outputAst.Expression | null; statements: outputAst.Statement[]; }[], constantStatements: outputAst.Statement[], meta: R3HmrMetadata) => outputAst.DeclareFunctionStmt;
Compiles the HMR update callback for a class.
Parameter definitions
Compiled definitions for the class (e.g.
defineComponent
calls).Parameter constantStatements
Supporting constants statements that were generated alongside the definition.
Parameter meta
HMR metadata extracted from the class.
function compileInjectable
compileInjectable: ( meta: R3InjectableMetadata, resolveForwardRefs: boolean) => R3CompiledExpression;
function compileInjector
compileInjector: (meta: R3InjectorMetadata) => R3CompiledExpression;
function compileNgModule
compileNgModule: (meta: R3NgModuleMetadata) => R3CompiledExpression;
Construct an
R3NgModuleDef
for the givenR3NgModuleMetadata
.
function compileOpaqueAsyncClassMetadata
compileOpaqueAsyncClassMetadata: ( metadata: R3ClassMetadata, deferResolver: outputAst.Expression, deferredDependencyNames: string[]) => outputAst.Expression;
Identical to
compileComponentClassMetadata
. Used for the cases where we're unable to analyze the deferred block dependencies, but we have a reference to the compiled dependency resolver function that we can use as is.Parameter metadata
Class metadata for the internal
setClassMetadata
call.Parameter deferResolver
Expression representing the deferred dependency loading function.
Parameter deferredDependencyNames
Names of the dependencies that are being loaded asynchronously.
function compilePipeFromMetadata
compilePipeFromMetadata: (metadata: R3PipeMetadata) => R3CompiledExpression;
function computeMsgId
computeMsgId: (msg: string, meaning?: string) => string;
function createCssSelectorFromNode
createCssSelectorFromNode: (node: t.Element | t.Template) => CssSelector;
Creates a
CssSelector
from an AST node.
function createInjectableType
createInjectableType: (meta: R3InjectableMetadata) => outputAst.ExpressionType;
function createMayBeForwardRefExpression
createMayBeForwardRefExpression: <T extends Expression>( expression: T, forwardRef: ForwardRefHandling) => MaybeForwardRefExpression<T>;
function devOnlyGuardedExpression
devOnlyGuardedExpression: (expr: outputAst.Expression) => outputAst.Expression;
function encapsulateStyle
encapsulateStyle: (style: string, componentIdentifier?: string) => string;
Encapsulates a CSS stylesheet with emulated view encapsulation. This allows a stylesheet to be used with an Angular component that is using the
ViewEncapsulation.Emulated
mode.Parameter style
The content of a CSS stylesheet.
Parameter componentIdentifier
The identifier to use within the CSS rules.
Returns
The encapsulated content for the style.
function expressionType
expressionType: ( expr: Expression, typeModifiers?: TypeModifier, typeParams?: Type[] | null) => ExpressionType;
function findMatchingDirectivesAndPipes
findMatchingDirectivesAndPipes: ( template: string, directiveSelectors: string[]) => { directives: { regular: string[]; deferCandidates: string[] }; pipes: { regular: string[]; deferCandidates: string[] };};
Given a template string and a set of available directive selectors, computes a list of matching selectors and splits them into 2 buckets: (1) eagerly used in a template and (2) directives used only in defer blocks. Similarly, returns 2 lists of pipes (eager and deferrable).
Note: deferrable directives selectors and pipes names used in
@defer
blocks are **candidates** and API caller should make sure that:* A Component where a given template is defined is standalone * Underlying dependency classes are also standalone * Dependency class symbols are not eagerly used in a TS file where a host component (that owns the template) is located
function fn
fn: ( params: FnParam[], body: Statement[], type?: Type | null, sourceSpan?: ParseSourceSpan | null, name?: string | null) => FunctionExpr;
function getHtmlTagDefinition
getHtmlTagDefinition: (tagName: string) => HtmlTagDefinition;
function getNsPrefix
getNsPrefix: { (fullName: string): string; (fullName: null): null };
function getSafePropertyAccessString
getSafePropertyAccessString: (accessor: string, name: string) => string;
function identifierName
identifierName: ( compileIdentifier: CompileIdentifierMetadata | null | undefined) => string | null;
function ifStmt
ifStmt: ( condition: Expression, thenClause: Statement[], elseClause?: Statement[], sourceSpan?: ParseSourceSpan, leadingComments?: LeadingComment[]) => IfStmt;
function importExpr
importExpr: ( id: ExternalReference, typeParams?: Type[] | null, sourceSpan?: ParseSourceSpan | null) => ExternalExpr;
function importType
importType: ( id: ExternalReference, typeParams?: Type[] | null, typeModifiers?: TypeModifier) => ExpressionType | null;
function isNgContainer
isNgContainer: (tagName: string) => boolean;
function isNgContent
isNgContent: (tagName: string) => boolean;
function isNgTemplate
isNgTemplate: (tagName: string) => boolean;
function isNull
isNull: (exp: Expression) => boolean;
function jsDocComment
jsDocComment: (tags?: JSDocTag[]) => JSDocComment;
function leadingComment
leadingComment: ( text: string, multiline?: boolean, trailingNewline?: boolean) => LeadingComment;
function literal
literal: ( value: any, type?: Type | null, sourceSpan?: ParseSourceSpan | null) => LiteralExpr;
function literalArr
literalArr: ( values: Expression[], type?: Type | null, sourceSpan?: ParseSourceSpan | null) => LiteralArrayExpr;
function literalMap
literalMap: ( values: { key: string; quoted: boolean; value: Expression }[], type?: MapType | null) => LiteralMapExpr;
function localizedString
localizedString: ( metaBlock: I18nMeta, messageParts: LiteralPiece[], placeholderNames: PlaceholderPiece[], expressions: Expression[], sourceSpan?: ParseSourceSpan | null) => LocalizedString;
function makeBindingParser
makeBindingParser: (interpolationConfig?: InterpolationConfig) => BindingParser;
Construct a
BindingParser
with a default configuration.
function mergeNsAndName
mergeNsAndName: (prefix: string, localName: string) => string;
function not
not: (expr: Expression, sourceSpan?: ParseSourceSpan | null) => NotExpr;
function nullSafeIsEquivalent
nullSafeIsEquivalent: <T extends { isEquivalent(other: T): boolean }>( base: T | null, other: T | null) => boolean;
function parseHostBindings
parseHostBindings: (host: { [key: string]: string | Expression;}) => ParsedHostBindings;
function parseSelectorToR3Selector
parseSelectorToR3Selector: (selector: string | null) => R3CssSelectorList;
function parseTemplate
parseTemplate: ( template: string, templateUrl: string, options?: ParseTemplateOptions) => ParsedTemplate;
Parse a template into render3
Node
s and additional metadata, with no other dependencies.Parameter template
text of the template to parse
Parameter templateUrl
URL to use for source mapping of the parsed template
Parameter options
options to modify how the template is parsed
function preserveWhitespacesDefault
preserveWhitespacesDefault: ( preserveWhitespacesOption: boolean | null, defaultSetting?: boolean) => boolean;
function publishFacade
publishFacade: (global: any) => void;
function r3JitTypeSourceSpan
r3JitTypeSourceSpan: ( kind: string, typeName: string, sourceUrl: string) => ParseSourceSpan;
Generates Source Span object for a given R3 Type for JIT mode.
Parameter kind
Component or Directive.
Parameter typeName
name of the Component or Directive.
Parameter sourceUrl
reference to Component or Directive source.
Returns
instance of ParseSourceSpan that represent a given Component or Directive.
function sanitizeIdentifier
sanitizeIdentifier: (name: string) => string;
function splitNsName
splitNsName: (elementName: string, fatal?: boolean) => [string | null, string];
function taggedTemplate
taggedTemplate: ( tag: Expression, template: TemplateLiteral, type?: Type | null, sourceSpan?: ParseSourceSpan | null) => TaggedTemplateExpr;
function tmplAstVisitAll
tmplAstVisitAll: <Result>( visitor: TmplAstVisitor<Result>, nodes: TmplAstNode[]) => Result[];
function transplantedType
transplantedType: <T>( type: T, typeModifiers?: TypeModifier) => TransplantedType<T>;
function typeofExpr
typeofExpr: (expr: Expression) => TypeofExpr;
function unary
unary: ( operator: UnaryOperator, expr: Expression, type?: Type, sourceSpan?: ParseSourceSpan | null) => UnaryOperatorExpr;
function variable
variable: ( name: string, type?: Type | null, sourceSpan?: ParseSourceSpan | null) => ReadVarExpr;
function verifyHostBindings
verifyHostBindings: ( bindings: ParsedHostBindings, sourceSpan: ParseSourceSpan) => ParseError[];
Verifies host bindings and returns the list of errors (if any). Empty array indicates that a given set of host bindings has no errors.
Parameter bindings
set of host bindings to verify.
Parameter sourceSpan
source span where host bindings were defined.
Returns
array of errors associated with a given set of host bindings.
function visitAll
visitAll: (visitor: Visitor, nodes: Node_2[], context?: any) => any[];
Classes
class AbsoluteSourceSpan
class AbsoluteSourceSpan {}
Records the absolute position of a text span in a source file, where
start
andend
are the starting and ending byte offsets, respectively, of the text span in a source file.
constructor
constructor(start: number, end: number);
property end
readonly end: number;
property start
readonly start: number;
class ArrayType
class ArrayType extends Type {}
constructor
constructor(of: Type, modifiers?: TypeModifier);
property of
of: Type;
method visitType
visitType: (visitor: TypeVisitor, context: any) => any;
class ArrowFunctionExpr
class ArrowFunctionExpr extends Expression {}
constructor
constructor( params: FnParam[], body: Expression | Statement[], type?: Type, sourceSpan?: ParseSourceSpan);
property body
body: Expression | Statement[];
property params
params: FnParam[];
method clone
clone: () => Expression;
method isConstant
isConstant: () => boolean;
method isEquivalent
isEquivalent: (e: Expression) => boolean;
method toDeclStmt
toDeclStmt: (name: string, modifiers?: StmtModifier) => DeclareVarStmt;
method visitExpression
visitExpression: (visitor: ExpressionVisitor, context: any) => any;
class AST
abstract class AST {}
constructor
constructor(span: ParseSpan, sourceSpan: AbsoluteSourceSpan);
property sourceSpan
sourceSpan: AbsoluteSourceSpan;
Absolute location of the expression AST in a source code file.
property span
span: ParseSpan;
method toString
toString: () => string;
method visit
abstract visit: (visitor: AstVisitor, context?: any) => any;
class ASTWithName
abstract class ASTWithName extends AST {}
constructor
constructor( span: ParseSpan, sourceSpan: AbsoluteSourceSpan, nameSpan: AbsoluteSourceSpan);
property nameSpan
nameSpan: AbsoluteSourceSpan;
class ASTWithSource
class ASTWithSource<T extends AST = AST> extends AST {}
constructor
constructor( ast: AST, source: string, location: string, absoluteOffset: number, errors: ParserError[]);
property ast
ast: AST;
property errors
errors: ParserError[];
property location
location: string;
property source
source: string;
method toString
toString: () => string;
method visit
visit: (visitor: AstVisitor, context?: any) => any;
class Attribute
class Attribute extends NodeWithI18n {}
constructor
constructor( name: string, value: string, sourceSpan: ParseSourceSpan, keySpan: ParseSourceSpan, valueSpan: ParseSourceSpan, valueTokens: InterpolatedAttributeToken[], i18n: I18nMeta_2);
property keySpan
readonly keySpan: ParseSourceSpan;
property name
name: string;
property value
value: string;
property valueSpan
valueSpan: ParseSourceSpan;
property valueTokens
valueTokens: InterpolatedAttributeToken[];
method visit
visit: (visitor: Visitor, context: any) => any;
class Binary
class Binary extends AST {}
constructor
constructor( span: ParseSpan, sourceSpan: AbsoluteSourceSpan, operation: string, left: AST, right: AST);
property left
left: AST;
property operation
operation: string;
property right
right: AST;
method visit
visit: (visitor: AstVisitor, context?: any) => any;
class BinaryOperatorExpr
class BinaryOperatorExpr extends Expression {}
constructor
constructor( operator: BinaryOperator, lhs: Expression, rhs: Expression, type?: Type, sourceSpan?: ParseSourceSpan, parens?: boolean);
property lhs
lhs: Expression;
property operator
operator: BinaryOperator;
property parens
parens: boolean;
property rhs
rhs: Expression;
method clone
clone: () => BinaryOperatorExpr;
method isConstant
isConstant: () => boolean;
method isEquivalent
isEquivalent: (e: Expression) => boolean;
method visitExpression
visitExpression: (visitor: ExpressionVisitor, context: any) => any;
class BindingPipe
class BindingPipe extends ASTWithName {}
constructor
constructor( span: ParseSpan, sourceSpan: AbsoluteSourceSpan, exp: AST, name: string, args: any[], nameSpan: AbsoluteSourceSpan);
property args
args: any[];
property exp
exp: AST;
property name
name: string;
method visit
visit: (visitor: AstVisitor, context?: any) => any;
class Block
class Block extends NodeWithI18n {}
constructor
constructor( name: string, parameters: BlockParameter[], children: Node_2[], sourceSpan: ParseSourceSpan, nameSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan?: ParseSourceSpan, i18n?: I18nMeta_2);
property children
children: Node_2[];
property endSourceSpan
endSourceSpan: ParseSourceSpan;
property name
name: string;
property nameSpan
nameSpan: ParseSourceSpan;
property parameters
parameters: BlockParameter[];
property startSourceSpan
startSourceSpan: ParseSourceSpan;
method visit
visit: (visitor: Visitor, context: any) => any;
class BlockParameter
class BlockParameter implements BaseNode {}
constructor
constructor(expression: string, sourceSpan: ParseSourceSpan);
property expression
expression: string;
property sourceSpan
sourceSpan: ParseSourceSpan;
method visit
visit: (visitor: Visitor, context: any) => any;
class BoundElementProperty
class BoundElementProperty {}
constructor
constructor( name: string, type: BindingType, securityContext: SecurityContext, value: ASTWithSource<AST>, unit: string, sourceSpan: ParseSourceSpan, keySpan: ParseSourceSpan, valueSpan: ParseSourceSpan);
property keySpan
readonly keySpan: ParseSourceSpan;
property name
name: string;
property securityContext
securityContext: SecurityContext;
property sourceSpan
sourceSpan: ParseSourceSpan;
property type
type: BindingType;
property unit
unit: string;
property value
value: ASTWithSource<AST>;
property valueSpan
valueSpan: ParseSourceSpan;
class BuiltinType
class BuiltinType extends Type {}
constructor
constructor(name: BuiltinTypeName, modifiers?: TypeModifier);
property name
name: BuiltinTypeName;
method visitType
visitType: (visitor: TypeVisitor, context: any) => any;
class Call
class Call extends AST {}
constructor
constructor( span: ParseSpan, sourceSpan: AbsoluteSourceSpan, receiver: AST, args: AST[], argumentSpan: AbsoluteSourceSpan);
property args
args: AST[];
property argumentSpan
argumentSpan: AbsoluteSourceSpan;
property receiver
receiver: AST;
method visit
visit: (visitor: AstVisitor, context?: any) => any;
class Chain
class Chain extends AST {}
Multiple expressions separated by a semicolon.
constructor
constructor(span: ParseSpan, sourceSpan: AbsoluteSourceSpan, expressions: any[]);
property expressions
expressions: any[];
method visit
visit: (visitor: AstVisitor, context?: any) => any;
class CommaExpr
class CommaExpr extends Expression {}
constructor
constructor(parts: Expression[], sourceSpan?: ParseSourceSpan);
property parts
parts: Expression[];
method clone
clone: () => CommaExpr;
method isConstant
isConstant: () => boolean;
method isEquivalent
isEquivalent: (e: Expression) => boolean;
method visitExpression
visitExpression: (visitor: ExpressionVisitor, context: any) => any;
class Comment
class Comment_2 implements BaseNode {}
constructor
constructor(value: string, sourceSpan: ParseSourceSpan);
property sourceSpan
sourceSpan: ParseSourceSpan;
property value
value: string;
method visit
visit: (visitor: Visitor, context: any) => any;
class CompilerConfig
class CompilerConfig {}
constructor
constructor({ defaultEncapsulation, preserveWhitespaces, strictInjectionParameters,}?: { defaultEncapsulation?: ViewEncapsulation; preserveWhitespaces?: boolean; strictInjectionParameters?: boolean;});
property defaultEncapsulation
defaultEncapsulation: ViewEncapsulation;
property preserveWhitespaces
preserveWhitespaces: boolean;
property strictInjectionParameters
strictInjectionParameters: boolean;
class Conditional
class Conditional extends AST {}
constructor
constructor( span: ParseSpan, sourceSpan: AbsoluteSourceSpan, condition: AST, trueExp: AST, falseExp: AST);
property condition
condition: AST;
property falseExp
falseExp: AST;
property trueExp
trueExp: AST;
method visit
visit: (visitor: AstVisitor, context?: any) => any;
class ConditionalExpr
class ConditionalExpr extends Expression {}
constructor
constructor( condition: Expression, trueCase: Expression, falseCase?: Expression, type?: Type, sourceSpan?: ParseSourceSpan);
property condition
condition: Expression;
property falseCase
falseCase: Expression;
property trueCase
trueCase: Expression;
method clone
clone: () => ConditionalExpr;
method isConstant
isConstant: () => boolean;
method isEquivalent
isEquivalent: (e: Expression) => boolean;
method visitExpression
visitExpression: (visitor: ExpressionVisitor, context: any) => any;
class ConstantPool
class ConstantPool {}
A constant pool allows a code emitter to share constant in an output context.
The constant pool also supports sharing access to ivy definitions references.
constructor
constructor(isClosureCompilerEnabled?: boolean);
property statements
statements: Statement[];
method getConstLiteral
getConstLiteral: ( literal: outputAst.Expression, forceShared?: boolean) => outputAst.Expression;
method getLiteralFactory
getLiteralFactory: ( literal: outputAst.LiteralArrayExpr | outputAst.LiteralMapExpr) => { literalFactory: outputAst.Expression; literalFactoryArguments: outputAst.Expression[];};
method getSharedConstant
getSharedConstant: ( def: SharedConstantDefinition, expr: outputAst.Expression) => outputAst.Expression;
method getSharedFunctionReference
getSharedFunctionReference: ( fn: outputAst.Expression, prefix: string, useUniqueName?: boolean) => outputAst.Expression;
method uniqueName
uniqueName: (name: string, alwaysIncludeSuffix?: boolean) => string;
Produce a unique name in the context of this pool.
The name might be unique among different prefixes if any of the prefixes end in a digit so the prefix should be a constant string (not based on user input) and must not end in a digit.
class CssSelector
class CssSelector {}
A css selector contains an element name, css classes and attribute/value pairs with the purpose of selecting subsets out of them.
property attrs
attrs: string[];
The selectors are encoded in pairs where: - even locations are attribute names - odd locations are attribute values.
Example: Selector:
[key1=value1][key2]
would parse to:['key1', 'value1', 'key2', '']
property classNames
classNames: string[];
property element
element: string;
property notSelectors
notSelectors: CssSelector[];
method addAttribute
addAttribute: (name: string, value?: string) => void;
method addClassName
addClassName: (name: string) => void;
method escapeAttribute
escapeAttribute: (attr: string) => string;
Escape
$
sequences from the CSS attribute selector.This is needed because
$
can have a special meaning in CSS selectors, with this method we are escaping$
with `$'. [MDN web link for more info](https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors).Parameter attr
the attribute to escape.
Returns
the escaped string.
method getAttrs
getAttrs: () => string[];
method hasElementSelector
hasElementSelector: () => boolean;
method isElementSelector
isElementSelector: () => boolean;
method parse
static parse: (selector: string) => CssSelector[];
method setElement
setElement: (element?: string | null) => void;
method toString
toString: () => string;
method unescapeAttribute
unescapeAttribute: (attr: string) => string;
Unescape
\$
sequences from the CSS attribute selector.This is needed because
$
can have a special meaning in CSS selectors, but we might want to match an attribute that contains$
. [MDN web link for more info](https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors).Parameter attr
the attribute to unescape.
Returns
the unescaped string.
class DeclareFunctionStmt
class DeclareFunctionStmt extends Statement {}
constructor
constructor( name: string, params: FnParam[], statements: Statement[], type?: Type, modifiers?: StmtModifier, sourceSpan?: ParseSourceSpan, leadingComments?: LeadingComment[]);
property name
name: string;
property params
params: FnParam[];
property statements
statements: Statement[];
property type
type: Type;
method isEquivalent
isEquivalent: (stmt: Statement) => boolean;
method visitStatement
visitStatement: (visitor: StatementVisitor, context: any) => any;
class DeclareVarStmt
class DeclareVarStmt extends Statement {}
constructor
constructor( name: string, value?: Expression, type?: Type, modifiers?: StmtModifier, sourceSpan?: ParseSourceSpan, leadingComments?: LeadingComment[]);
property name
name: string;
property type
type: Type;
property value
value?: Expression;
method isEquivalent
isEquivalent: (stmt: Statement) => boolean;
method visitStatement
visitStatement: (visitor: StatementVisitor, context: any) => any;
class DomElementSchemaRegistry
class DomElementSchemaRegistry extends ElementSchemaRegistry {}
constructor
constructor();
method allKnownAttributesOfElement
allKnownAttributesOfElement: (tagName: string) => string[];
method allKnownElementNames
allKnownElementNames: () => string[];
method allKnownEventsOfElement
allKnownEventsOfElement: (tagName: string) => string[];
method getDefaultComponentElementName
getDefaultComponentElementName: () => string;
method getMappedPropName
getMappedPropName: (propName: string) => string;
method hasElement
hasElement: (tagName: string, schemaMetas: SchemaMetadata[]) => boolean;
method hasProperty
hasProperty: ( tagName: string, propName: string, schemaMetas: SchemaMetadata[]) => boolean;
method normalizeAnimationStyleProperty
normalizeAnimationStyleProperty: (propName: string) => string;
method normalizeAnimationStyleValue
normalizeAnimationStyleValue: ( camelCaseProp: string, userProvidedProp: string, val: string | number) => { error: string; value: string };
method securityContext
securityContext: ( tagName: string, propName: string, isAttribute: boolean) => SecurityContext;
securityContext returns the security context for the given property on the given DOM tag.
Tag and property name are statically known and cannot change at runtime, i.e. it is not possible to bind a value into a changing attribute or tag name.
The filtering is based on a list of allowed tags|attributes. All attributes in the schema above are assumed to have the 'NONE' security context, i.e. that they are safe inert string values. Only specific well known attack vectors are assigned their appropriate context.
method validateAttribute
validateAttribute: (name: string) => { error: boolean; msg?: string };
method validateProperty
validateProperty: (name: string) => { error: boolean; msg?: string };
class DynamicImportExpr
class DynamicImportExpr extends Expression {}
constructor
constructor( url: string | Expression, sourceSpan?: ParseSourceSpan, urlComment?: string);
property url
url: string | Expression;
property urlComment
urlComment?: string;
method clone
clone: () => DynamicImportExpr;
method isConstant
isConstant: () => boolean;
method isEquivalent
isEquivalent: (e: Expression) => boolean;
method visitExpression
visitExpression: (visitor: ExpressionVisitor, context: any) => any;
class Element
class Element_2 extends NodeWithI18n {}
constructor
constructor( name: string, attrs: Attribute[], children: Node_2[], sourceSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan?: ParseSourceSpan, i18n?: I18nMeta_2);
property attrs
attrs: Attribute[];
property children
children: Node_2[];
property endSourceSpan
endSourceSpan: ParseSourceSpan;
property name
name: string;
property startSourceSpan
startSourceSpan: ParseSourceSpan;
method visit
visit: (visitor: Visitor, context: any) => any;
class ElementSchemaRegistry
abstract class ElementSchemaRegistry {}
method allKnownElementNames
abstract allKnownElementNames: () => string[];
method getDefaultComponentElementName
abstract getDefaultComponentElementName: () => string;
method getMappedPropName
abstract getMappedPropName: (propName: string) => string;
method hasElement
abstract hasElement: (tagName: string, schemaMetas: SchemaMetadata[]) => boolean;
method hasProperty
abstract hasProperty: ( tagName: string, propName: string, schemaMetas: SchemaMetadata[]) => boolean;
method normalizeAnimationStyleProperty
abstract normalizeAnimationStyleProperty: (propName: string) => string;
method normalizeAnimationStyleValue
abstract normalizeAnimationStyleValue: ( camelCaseProp: string, userProvidedProp: string, val: string | number) => { error: string; value: string };
method securityContext
abstract securityContext: ( elementName: string, propName: string, isAttribute: boolean) => SecurityContext;
method validateAttribute
abstract validateAttribute: (name: string) => { error: boolean; msg?: string };
method validateProperty
abstract validateProperty: (name: string) => { error: boolean; msg?: string };
class EmitterVisitorContext
class EmitterVisitorContext {}
constructor
constructor(_indent: number);
method createRoot
static createRoot: () => EmitterVisitorContext;
method decIndent
decIndent: () => void;
method incIndent
incIndent: () => void;
method lineIsEmpty
lineIsEmpty: () => boolean;
method lineLength
lineLength: () => number;
method print
print: ( from: { sourceSpan: ParseSourceSpan | null } | null, part: string, newLine?: boolean) => void;
method println
println: ( from?: { sourceSpan: ParseSourceSpan | null } | null, lastPart?: string) => void;
method removeEmptyLastLine
removeEmptyLastLine: () => void;
method spanOf
spanOf: (line: number, column: number) => ParseSourceSpan | null;
method toSource
toSource: () => string;
method toSourceMapGenerator
toSourceMapGenerator: ( genFilePath: string, startsAtLine?: number) => SourceMapGenerator;
class EmptyExpr
class EmptyExpr extends AST {}
method visit
visit: (visitor: AstVisitor, context?: any) => void;
class Expansion
class Expansion extends NodeWithI18n {}
constructor
constructor( switchValue: string, type: string, cases: ExpansionCase[], sourceSpan: ParseSourceSpan, switchValueSourceSpan: ParseSourceSpan, i18n?: I18nMeta_2);
property cases
cases: ExpansionCase[];
property switchValue
switchValue: string;
property switchValueSourceSpan
switchValueSourceSpan: ParseSourceSpan;
property type
type: string;
method visit
visit: (visitor: Visitor, context: any) => any;
class ExpansionCase
class ExpansionCase implements BaseNode {}
constructor
constructor( value: string, expression: Node_2[], sourceSpan: ParseSourceSpan, valueSourceSpan: ParseSourceSpan, expSourceSpan: ParseSourceSpan);
property expression
expression: Node_2[];
property expSourceSpan
expSourceSpan: ParseSourceSpan;
property sourceSpan
sourceSpan: ParseSourceSpan;
property value
value: string;
property valueSourceSpan
valueSourceSpan: ParseSourceSpan;
method visit
visit: (visitor: Visitor, context: any) => any;
class Expression
abstract class Expression {}
constructor
constructor(type: Type, sourceSpan?: ParseSourceSpan);
property sourceSpan
sourceSpan: ParseSourceSpan;
property type
type: Type;
method and
and: ( rhs: Expression, sourceSpan?: ParseSourceSpan | null) => BinaryOperatorExpr;
method bigger
bigger: ( rhs: Expression, sourceSpan?: ParseSourceSpan | null) => BinaryOperatorExpr;
method biggerEquals
biggerEquals: ( rhs: Expression, sourceSpan?: ParseSourceSpan | null) => BinaryOperatorExpr;
method bitwiseAnd
bitwiseAnd: ( rhs: Expression, sourceSpan?: ParseSourceSpan | null, parens?: boolean) => BinaryOperatorExpr;
method bitwiseOr
bitwiseOr: ( rhs: Expression, sourceSpan?: ParseSourceSpan | null, parens?: boolean) => BinaryOperatorExpr;
method callFn
callFn: ( params: Expression[], sourceSpan?: ParseSourceSpan | null, pure?: boolean) => InvokeFunctionExpr;
method clone
abstract clone: () => Expression;
method conditional
conditional: ( trueCase: Expression, falseCase?: Expression | null, sourceSpan?: ParseSourceSpan | null) => ConditionalExpr;
method divide
divide: ( rhs: Expression, sourceSpan?: ParseSourceSpan | null) => BinaryOperatorExpr;
method equals
equals: ( rhs: Expression, sourceSpan?: ParseSourceSpan | null) => BinaryOperatorExpr;
method identical
identical: ( rhs: Expression, sourceSpan?: ParseSourceSpan | null) => BinaryOperatorExpr;
method instantiate
instantiate: ( params: Expression[], type?: Type | null, sourceSpan?: ParseSourceSpan | null) => InstantiateExpr;
method isBlank
isBlank: (sourceSpan?: ParseSourceSpan | null) => Expression;
method isConstant
abstract isConstant: () => boolean;
Return true if the expression is constant.
method isEquivalent
abstract isEquivalent: (e: Expression) => boolean;
Calculates whether this expression produces the same value as the given expression. Note: We don't check Types nor ParseSourceSpans nor function arguments.
method key
key: ( index: Expression, type?: Type | null, sourceSpan?: ParseSourceSpan | null) => ReadKeyExpr;
method lower
lower: ( rhs: Expression, sourceSpan?: ParseSourceSpan | null) => BinaryOperatorExpr;
method lowerEquals
lowerEquals: ( rhs: Expression, sourceSpan?: ParseSourceSpan | null) => BinaryOperatorExpr;
method minus
minus: ( rhs: Expression, sourceSpan?: ParseSourceSpan | null) => BinaryOperatorExpr;
method modulo
modulo: ( rhs: Expression, sourceSpan?: ParseSourceSpan | null) => BinaryOperatorExpr;
method multiply
multiply: ( rhs: Expression, sourceSpan?: ParseSourceSpan | null) => BinaryOperatorExpr;
method notEquals
notEquals: ( rhs: Expression, sourceSpan?: ParseSourceSpan | null) => BinaryOperatorExpr;
method notIdentical
notIdentical: ( rhs: Expression, sourceSpan?: ParseSourceSpan | null) => BinaryOperatorExpr;
method nullishCoalesce
nullishCoalesce: ( rhs: Expression, sourceSpan?: ParseSourceSpan | null) => BinaryOperatorExpr;
method or
or: (rhs: Expression, sourceSpan?: ParseSourceSpan | null) => BinaryOperatorExpr;
method plus
plus: ( rhs: Expression, sourceSpan?: ParseSourceSpan | null) => BinaryOperatorExpr;
method prop
prop: (name: string, sourceSpan?: ParseSourceSpan | null) => ReadPropExpr;
method toStmt
toStmt: () => Statement;
method visitExpression
abstract visitExpression: (visitor: ExpressionVisitor, context: any) => any;
class ExpressionBinding
class ExpressionBinding {}
constructor
constructor( sourceSpan: AbsoluteSourceSpan, key: TemplateBindingIdentifier, value: ASTWithSource<AST>);
Parameter sourceSpan
entire span of the binding.
Parameter key
binding name, like ngForOf, ngForTrackBy, ngIf, along with its span. Note that the length of the span may not be the same as
key.source.length
. For example, 1. key.source = ngFor, key.span is for "ngFor" 2. key.source = ngForOf, key.span is for "of" 3. key.source = ngForTrackBy, key.span is for "trackBy"Parameter value
optional expression for the RHS.
property key
readonly key: TemplateBindingIdentifier;
property sourceSpan
readonly sourceSpan: AbsoluteSourceSpan;
property value
readonly value: ASTWithSource<AST>;
class ExpressionStatement
class ExpressionStatement extends Statement {}
constructor
constructor( expr: Expression, sourceSpan?: ParseSourceSpan, leadingComments?: LeadingComment[]);
property expr
expr: Expression;
method isEquivalent
isEquivalent: (stmt: Statement) => boolean;
method visitStatement
visitStatement: (visitor: StatementVisitor, context: any) => any;
class ExpressionType
class ExpressionType extends Type {}
constructor
constructor(value: Expression, modifiers?: TypeModifier, typeParams?: Type[]);
property typeParams
typeParams: Type[];
property value
value: Expression;
method visitType
visitType: (visitor: TypeVisitor, context: any) => any;
class ExternalExpr
class ExternalExpr extends Expression {}
constructor
constructor( value: ExternalReference, type?: Type, typeParams?: Type[], sourceSpan?: ParseSourceSpan);
property typeParams
typeParams: Type[];
property value
value: ExternalReference;
method clone
clone: () => ExternalExpr;
method isConstant
isConstant: () => boolean;
method isEquivalent
isEquivalent: (e: Expression) => boolean;
method visitExpression
visitExpression: (visitor: ExpressionVisitor, context: any) => any;
class ExternalReference
class ExternalReference {}
constructor
constructor(moduleName: string, name: string);
property moduleName
moduleName: string;
property name
name: string;
class FunctionExpr
class FunctionExpr extends Expression {}
constructor
constructor( params: FnParam[], statements: Statement[], type?: Type, sourceSpan?: ParseSourceSpan, name?: string);
property name
name?: string;
property params
params: FnParam[];
property statements
statements: Statement[];
method clone
clone: () => FunctionExpr;
method isConstant
isConstant: () => boolean;
method isEquivalent
isEquivalent: (e: Expression | Statement) => boolean;
method toDeclStmt
toDeclStmt: (name: string, modifiers?: StmtModifier) => DeclareFunctionStmt;
method visitExpression
visitExpression: (visitor: ExpressionVisitor, context: any) => any;
class HtmlParser
class HtmlParser extends Parser_2 {}
constructor
constructor();
method parse
parse: ( source: string, url: string, options?: TokenizeOptions) => ParseTreeResult;
class HtmlTagDefinition
class HtmlTagDefinition implements TagDefinition {}
constructor
constructor({ closedByChildren, implicitNamespacePrefix, contentType, closedByParent, isVoid, ignoreFirstLf, preventNamespaceInheritance, canSelfClose,}?: { closedByChildren?: string[]; closedByParent?: boolean; implicitNamespacePrefix?: string; contentType?: | TagContentType | { [namespace: string]: TagContentType; default: TagContentType }; isVoid?: boolean; ignoreFirstLf?: boolean; preventNamespaceInheritance?: boolean; canSelfClose?: boolean;});
property canSelfClose
canSelfClose: boolean;
property closedByParent
closedByParent: boolean;
property ignoreFirstLf
ignoreFirstLf: boolean;
property implicitNamespacePrefix
implicitNamespacePrefix: string;
property isVoid
isVoid: boolean;
property preventNamespaceInheritance
preventNamespaceInheritance: boolean;
method getContentType
getContentType: (prefix?: string) => TagContentType;
method isClosedByChild
isClosedByChild: (name: string) => boolean;
class I18NHtmlParser
class I18NHtmlParser implements HtmlParser {}
constructor
constructor( _htmlParser: HtmlParser, translations?: string, translationsFormat?: string, missingTranslation?: MissingTranslationStrategy, console?: Console_2);
property getTagDefinition
getTagDefinition: any;
method parse
parse: ( source: string, url: string, options?: TokenizeOptions) => ParseTreeResult;
class IfStmt
class IfStmt extends Statement {}
constructor
constructor( condition: Expression, trueCase: Statement[], falseCase?: Statement[], sourceSpan?: ParseSourceSpan, leadingComments?: LeadingComment[]);
property condition
condition: Expression;
property falseCase
falseCase: Statement[];
property trueCase
trueCase: Statement[];
method isEquivalent
isEquivalent: (stmt: Statement) => boolean;
method visitStatement
visitStatement: (visitor: StatementVisitor, context: any) => any;
class ImplicitReceiver
class ImplicitReceiver extends AST {}
method visit
visit: (visitor: AstVisitor, context?: any) => any;
class InstantiateExpr
class InstantiateExpr extends Expression {}
constructor
constructor( classExpr: Expression, args: Expression[], type?: Type, sourceSpan?: ParseSourceSpan);
property args
args: Expression[];
property classExpr
classExpr: Expression;
method clone
clone: () => InstantiateExpr;
method isConstant
isConstant: () => boolean;
method isEquivalent
isEquivalent: (e: Expression) => boolean;
method visitExpression
visitExpression: (visitor: ExpressionVisitor, context: any) => any;
class Interpolation
class Interpolation extends AST {}
constructor
constructor( span: ParseSpan, sourceSpan: AbsoluteSourceSpan, strings: string[], expressions: AST[]);
property expressions
expressions: AST[];
property strings
strings: string[];
method visit
visit: (visitor: AstVisitor, context?: any) => any;
class InterpolationConfig
class InterpolationConfig {}
constructor
constructor(start: string, end: string);
property end
end: string;
property start
start: string;
method fromArray
static fromArray: (markers: [string, string] | null) => InterpolationConfig;
class InvokeFunctionExpr
class InvokeFunctionExpr extends Expression {}
constructor
constructor( fn: Expression, args: Expression[], type?: Type, sourceSpan?: ParseSourceSpan, pure?: boolean);
property args
args: Expression[];
property fn
fn: Expression;
property pure
pure: boolean;
property receiver
readonly receiver: Expression;
method clone
clone: () => InvokeFunctionExpr;
method isConstant
isConstant: () => boolean;
method isEquivalent
isEquivalent: (e: Expression) => boolean;
method visitExpression
visitExpression: (visitor: ExpressionVisitor, context: any) => any;
class JitEvaluator
class JitEvaluator {}
A helper class to manage the evaluation of JIT generated code.
method evaluateCode
evaluateCode: ( sourceUrl: string, ctx: EmitterVisitorContext, vars: { [key: string]: any }, createSourceMap: boolean) => any;
Evaluate a piece of JIT generated code.
Parameter sourceUrl
The URL of this generated code.
Parameter ctx
A context object that contains an AST of the code to be evaluated.
Parameter vars
A map containing the names and values of variables that the evaluated code might reference.
Parameter createSourceMap
If true then create a source-map for the generated code and include it inline as a source-map comment.
Returns
The result of evaluating the code.
method evaluateStatements
evaluateStatements: ( sourceUrl: string, statements: outputAst.Statement[], refResolver: ExternalReferenceResolver, createSourceMaps: boolean) => { [key: string]: any };
Parameter sourceUrl
The URL of the generated code.
Parameter statements
An array of Angular statement AST nodes to be evaluated.
Parameter refResolver
Resolves
o.ExternalReference
s into values.Parameter createSourceMaps
If true then create a source-map for the generated code and include it inline as a source-map comment.
Returns
A map of all the variables in the generated code.
method executeFunction
executeFunction: (fn: Function, args: any[]) => any;
Execute a JIT generated function by calling it.
This method can be overridden in tests to capture the functions that are generated by this
JitEvaluator
class.Parameter fn
A function to execute.
Parameter args
The arguments to pass to the function being executed.
Returns
The return value of the executed function.
class JSDocComment
class JSDocComment extends LeadingComment {}
constructor
constructor(tags: JSDocTag[]);
property tags
tags: JSDocTag[];
method toString
toString: () => string;
class KeyedRead
class KeyedRead extends AST {}
constructor
constructor( span: ParseSpan, sourceSpan: AbsoluteSourceSpan, receiver: AST, key: AST);
property key
key: AST;
property receiver
receiver: AST;
method visit
visit: (visitor: AstVisitor, context?: any) => any;
class KeyedWrite
class KeyedWrite extends AST {}
constructor
constructor( span: ParseSpan, sourceSpan: AbsoluteSourceSpan, receiver: AST, key: AST, value: AST);
property key
key: AST;
property receiver
receiver: AST;
property value
value: AST;
method visit
visit: (visitor: AstVisitor, context?: any) => any;
class LeadingComment
class LeadingComment {}
constructor
constructor(text: string, multiline: boolean, trailingNewline: boolean);
property multiline
multiline: boolean;
property text
text: string;
property trailingNewline
trailingNewline: boolean;
method toString
toString: () => string;
class LetDeclaration
class LetDeclaration implements BaseNode {}
constructor
constructor( name: string, value: string, sourceSpan: ParseSourceSpan, nameSpan: ParseSourceSpan, valueSpan: ParseSourceSpan);
property name
name: string;
property nameSpan
readonly nameSpan: ParseSourceSpan;
property sourceSpan
sourceSpan: ParseSourceSpan;
property value
value: string;
property valueSpan
valueSpan: ParseSourceSpan;
method visit
visit: (visitor: Visitor, context: any) => any;
class LiteralArray
class LiteralArray extends AST {}
constructor
constructor(span: ParseSpan, sourceSpan: AbsoluteSourceSpan, expressions: any[]);
property expressions
expressions: any[];
method visit
visit: (visitor: AstVisitor, context?: any) => any;
class LiteralArrayExpr
class LiteralArrayExpr extends Expression {}
constructor
constructor(entries: Expression[], type?: Type, sourceSpan?: ParseSourceSpan);
property entries
entries: Expression[];
method clone
clone: () => LiteralArrayExpr;
method isConstant
isConstant: () => boolean;
method isEquivalent
isEquivalent: (e: Expression) => boolean;
method visitExpression
visitExpression: (visitor: ExpressionVisitor, context: any) => any;
class LiteralExpr
class LiteralExpr extends Expression {}
constructor
constructor( value: string | number | boolean, type?: Type, sourceSpan?: ParseSourceSpan);
property value
value: string | number | boolean;
method clone
clone: () => LiteralExpr;
method isConstant
isConstant: () => boolean;
method isEquivalent
isEquivalent: (e: Expression) => boolean;
method visitExpression
visitExpression: (visitor: ExpressionVisitor, context: any) => any;
class LiteralMap
class LiteralMap extends AST {}
constructor
constructor( span: ParseSpan, sourceSpan: AbsoluteSourceSpan, keys: LiteralMapKey[], values: any[]);
property keys
keys: LiteralMapKey[];
property values
values: any[];
method visit
visit: (visitor: AstVisitor, context?: any) => any;
class LiteralMapExpr
class LiteralMapExpr extends Expression {}
constructor
constructor( entries: LiteralMapEntry[], type?: MapType, sourceSpan?: ParseSourceSpan);
property entries
entries: LiteralMapEntry[];
property valueType
valueType: Type;
method clone
clone: () => LiteralMapExpr;
method isConstant
isConstant: () => boolean;
method isEquivalent
isEquivalent: (e: Expression) => boolean;
method visitExpression
visitExpression: (visitor: ExpressionVisitor, context: any) => any;
class LiteralPrimitive
class LiteralPrimitive extends AST {}
constructor
constructor(span: ParseSpan, sourceSpan: AbsoluteSourceSpan, value: any);
property value
value: any;
method visit
visit: (visitor: AstVisitor, context?: any) => any;
class LocalizedString
class LocalizedString extends Expression {}
constructor
constructor( metaBlock: I18nMeta, messageParts: LiteralPiece[], placeHolderNames: PlaceholderPiece[], expressions: Expression[], sourceSpan?: ParseSourceSpan);
property expressions
readonly expressions: Expression[];
property messageParts
readonly messageParts: LiteralPiece[];
property metaBlock
readonly metaBlock: I18nMeta;
property placeHolderNames
readonly placeHolderNames: PlaceholderPiece[];
method clone
clone: () => LocalizedString;
method getMessagePartSourceSpan
getMessagePartSourceSpan: (i: number) => ParseSourceSpan | null;
method getPlaceholderSourceSpan
getPlaceholderSourceSpan: (i: number) => ParseSourceSpan;
method isConstant
isConstant: () => boolean;
method isEquivalent
isEquivalent: (e: Expression) => boolean;
method serializeI18nHead
serializeI18nHead: () => CookedRawString;
Serialize the given
meta
andmessagePart
into "cooked" and "raw" strings that can be used in a$localize
tagged string. The format of the metadata is the same as that parsed byparseI18nMeta()
.Parameter meta
The metadata to serialize
Parameter messagePart
The first part of the tagged string
method serializeI18nTemplatePart
serializeI18nTemplatePart: (partIndex: number) => CookedRawString;
Serialize the given
placeholderName
andmessagePart
into "cooked" and "raw" strings that can be used in a$localize
tagged string.The format is
:<placeholder-name>[@@<associated-id>]:
.The
associated-id
is the message id of the (usually an ICU) message to which this placeholder refers.Parameter partIndex
The index of the message part to serialize.
method visitExpression
visitExpression: (visitor: ExpressionVisitor, context: any) => any;
class MapType
class MapType extends Type {}
constructor
constructor(valueType: Type, modifiers?: TypeModifier);
property valueType
valueType: Type;
method visitType
visitType: (visitor: TypeVisitor, context: any) => any;
class MessageBundle
class MessageBundle {}
A container for message extracted from the templates.
constructor
constructor( _htmlParser: HtmlParser, _implicitTags: string[], _implicitAttrs: { [k: string]: string[] }, _locale?: string, _preserveWhitespace?: boolean);
method getMessages
getMessages: () => i18n.Message[];
method updateFromTemplate
updateFromTemplate: ( source: string, url: string, interpolationConfig: InterpolationConfig) => ParseError[];
method write
write: ( serializer: Serializer, filterSources?: (path: string) => string) => string;
class NodeWithI18n
abstract class NodeWithI18n implements BaseNode {}
constructor
constructor(sourceSpan: ParseSourceSpan, i18n?: I18nMeta_2);
property i18n
i18n?: I18nMeta_2;
property sourceSpan
sourceSpan: ParseSourceSpan;
method visit
abstract visit: (visitor: Visitor, context: any) => any;
class NonNullAssert
class NonNullAssert extends AST {}
constructor
constructor(span: ParseSpan, sourceSpan: AbsoluteSourceSpan, expression: AST);
property expression
expression: AST;
method visit
visit: (visitor: AstVisitor, context?: any) => any;
class NotExpr
class NotExpr extends Expression {}
constructor
constructor(condition: Expression, sourceSpan?: ParseSourceSpan);
property condition
condition: Expression;
method clone
clone: () => NotExpr;
method isConstant
isConstant: () => boolean;
method isEquivalent
isEquivalent: (e: Expression) => boolean;
method visitExpression
visitExpression: (visitor: ExpressionVisitor, context: any) => any;
class ParsedEvent
class ParsedEvent {}
constructor
constructor( name: string, targetOrPhase: string, type: number, handler: ASTWithSource<KeyedRead | NonNullAssert | PropertyRead>, sourceSpan: ParseSourceSpan, handlerSpan: ParseSourceSpan, keySpan: ParseSourceSpan);
constructor
constructor( name: string, targetOrPhase: string, type: ParsedEventType, handler: ASTWithSource<AST>, sourceSpan: ParseSourceSpan, handlerSpan: ParseSourceSpan, keySpan: ParseSourceSpan);
property handler
handler: ASTWithSource<AST>;
property handlerSpan
handlerSpan: ParseSourceSpan;
property keySpan
readonly keySpan: ParseSourceSpan;
property name
name: string;
property sourceSpan
sourceSpan: ParseSourceSpan;
property targetOrPhase
targetOrPhase: string;
property type
type: ParsedEventType;
class ParsedProperty
class ParsedProperty {}
constructor
constructor( name: string, expression: ASTWithSource<AST>, type: ParsedPropertyType, sourceSpan: ParseSourceSpan, keySpan: ParseSourceSpan, valueSpan: ParseSourceSpan);
property expression
expression: ASTWithSource<AST>;
property isAnimation
readonly isAnimation: boolean;
property isLiteral
readonly isLiteral: boolean;
property keySpan
readonly keySpan: ParseSourceSpan;
property name
name: string;
property sourceSpan
sourceSpan: ParseSourceSpan;
property type
type: ParsedPropertyType;
property valueSpan
valueSpan: ParseSourceSpan;
class ParsedVariable
class ParsedVariable {}
ParsedVariable represents a variable declaration in a microsyntax expression.
constructor
constructor( name: string, value: string, sourceSpan: ParseSourceSpan, keySpan: ParseSourceSpan, valueSpan?: ParseSourceSpan);
property keySpan
readonly keySpan: ParseSourceSpan;
property name
readonly name: string;
property sourceSpan
readonly sourceSpan: ParseSourceSpan;
property value
readonly value: string;
property valueSpan
readonly valueSpan?: ParseSourceSpan;
class ParseError
class ParseError {}
constructor
constructor( span: ParseSourceSpan, msg: string, level?: ParseErrorLevel, relatedError?: {});
property level
readonly level: ParseErrorLevel;
Severity level of the error.
property msg
readonly msg: string;
Error message.
property relatedError
readonly relatedError?: {};
Error that caused the error to be surfaced. For example, an error in a sub-expression that couldn't be parsed. Not guaranteed to be defined, but can be used to provide more context.
property span
readonly span: ParseSourceSpan;
Location of the error.
method contextualMessage
contextualMessage: () => string;
method toString
toString: () => string;
class ParseLocation
class ParseLocation {}
constructor
constructor(file: ParseSourceFile, offset: number, line: number, col: number);
property col
col: number;
property file
file: ParseSourceFile;
property line
line: number;
property offset
offset: number;
method getContext
getContext: ( maxChars: number, maxLines: number) => { before: string; after: string } | null;
method moveBy
moveBy: (delta: number) => ParseLocation;
method toString
toString: () => string;
class Parser
class Parser {}
constructor
constructor(_lexer: Lexer);
method parseAction
parseAction: ( input: string, location: string, absoluteOffset: number, interpolationConfig?: InterpolationConfig) => ASTWithSource;
method parseBinding
parseBinding: ( input: string, location: string, absoluteOffset: number, interpolationConfig?: InterpolationConfig) => ASTWithSource;
method parseInterpolation
parseInterpolation: ( input: string, location: string, absoluteOffset: number, interpolatedTokens: | InterpolatedAttributeToken[] | InterpolatedTextToken[] | null, interpolationConfig?: InterpolationConfig) => ASTWithSource | null;
method parseInterpolationExpression
parseInterpolationExpression: ( expression: string, location: string, absoluteOffset: number) => ASTWithSource;
Similar to
parseInterpolation
, but treats the provided string as a single expression element that would normally appear within the interpolation prefix and suffix ({{
and}}
). This is used for parsing the switch expression in ICUs.
method parseSimpleBinding
parseSimpleBinding: ( input: string, location: string, absoluteOffset: number, interpolationConfig?: InterpolationConfig) => ASTWithSource;
method parseTemplateBindings
parseTemplateBindings: ( templateKey: string, templateValue: string, templateUrl: string, absoluteKeyOffset: number, absoluteValueOffset: number) => TemplateBindingParseResult;
Parse microsyntax template expression and return a list of bindings or parsing errors in case the given expression is invalid.
For example,
<div *ngFor="let item of items">^ ^ absoluteValueOffset for `templateValue`absoluteKeyOffset for `templateKey`contains three bindings: 1. ngFor -> null 2. item -> NgForOfContext.$implicit 3. ngForOf -> items
This is apparent from the de-sugared template:
<ng-template ngFor let-item [ngForOf]="items">Parameter templateKey
name of directive, without the * prefix. For example: ngIf, ngFor
Parameter templateValue
RHS of the microsyntax attribute
Parameter templateUrl
template filename if it's external, component filename if it's inline
Parameter absoluteKeyOffset
start of the
templateKey
Parameter absoluteValueOffset
start of the
templateValue
method splitInterpolation
splitInterpolation: ( input: string, location: string, interpolatedTokens: | InterpolatedAttributeToken[] | InterpolatedTextToken[] | null, interpolationConfig?: InterpolationConfig) => SplitInterpolation;
Splits a string of text into "raw" text segments and expressions present in interpolations in the string. Returns
null
if there are no interpolations, otherwise aSplitInterpolation
with splits that look like <raw text> <raw text> ... <raw text> <raw text>
method wrapLiteralPrimitive
wrapLiteralPrimitive: ( input: string | null, location: string, absoluteOffset: number) => ASTWithSource;
class ParserError
class ParserError {}
constructor
constructor( message: string, input: string, errLocation: string, ctxLocation?: any);
property ctxLocation
ctxLocation?: any;
property errLocation
errLocation: string;
property input
input: string;
property message
message: string;
class ParseSourceFile
class ParseSourceFile {}
constructor
constructor(content: string, url: string);
property content
content: string;
property url
url: string;
class ParseSourceSpan
class ParseSourceSpan {}
constructor
constructor( start: ParseLocation, end: ParseLocation, fullStart?: ParseLocation, details?: string);
Create an object that holds information about spans of tokens/nodes captured during lexing/parsing of text.
Parameter start
The location of the start of the span (having skipped leading trivia). Skipping leading trivia makes source-spans more "user friendly", since things like HTML elements will appear to begin at the start of the opening tag, rather than at the start of any leading trivia, which could include newlines.
Parameter end
The location of the end of the span.
Parameter fullStart
The start of the token without skipping the leading trivia. This is used by tooling that splits tokens further, such as extracting Angular interpolations from text tokens. Such tooling creates new source-spans relative to the original token's source-span. If leading trivia characters have been skipped then the new source-spans may be incorrectly offset.
Parameter details
Additional information (such as identifier names) that should be associated with the span.
property details
details: string;
property end
end: ParseLocation;
property fullStart
fullStart: ParseLocation;
property start
start: ParseLocation;
method toString
toString: () => string;
class ParseSpan
class ParseSpan {}
constructor
constructor(start: number, end: number);
property end
end: number;
property start
start: number;
method toAbsolute
toAbsolute: (absoluteOffset: number) => AbsoluteSourceSpan;
class ParseTreeResult
class ParseTreeResult {}
constructor
constructor(rootNodes: Node_2[], errors: ParseError[]);
property errors
errors: ParseError[];
property rootNodes
rootNodes: Node_2[];
class PrefixNot
class PrefixNot extends AST {}
constructor
constructor(span: ParseSpan, sourceSpan: AbsoluteSourceSpan, expression: AST);
property expression
expression: AST;
method visit
visit: (visitor: AstVisitor, context?: any) => any;
class PropertyRead
class PropertyRead extends ASTWithName {}
constructor
constructor( span: ParseSpan, sourceSpan: AbsoluteSourceSpan, nameSpan: AbsoluteSourceSpan, receiver: AST, name: string);
property name
name: string;
property receiver
receiver: AST;
method visit
visit: (visitor: AstVisitor, context?: any) => any;
class PropertyWrite
class PropertyWrite extends ASTWithName {}
constructor
constructor( span: ParseSpan, sourceSpan: AbsoluteSourceSpan, nameSpan: AbsoluteSourceSpan, receiver: AST, name: string, value: AST);
property name
name: string;
property receiver
receiver: AST;
property value
value: AST;
method visit
visit: (visitor: AstVisitor, context?: any) => any;
class R3BoundTarget
class R3BoundTarget<DirectiveT extends DirectiveMeta> implements BoundTarget<DirectiveT> {}
Metadata container for a
Target
that allows queries for specific bits of metadata.See
BoundTarget
for documentation on the individual methods.
constructor
constructor( target: Target, directives: Map<TmplAstElement | TmplAstTemplate, DirectiveT[]>, eagerDirectives: DirectiveT[], bindings: Map< TmplAstBoundAttribute | TmplAstBoundEvent | TmplAstTextAttribute, TmplAstElement | TmplAstTemplate | DirectiveT >, references: Map< | TmplAstReference | TmplAstBoundAttribute | TmplAstBoundEvent | TmplAstTextAttribute, | TmplAstElement | TmplAstTemplate | { directive: DirectiveT; node: TmplAstElement | TmplAstTemplate } >, exprTargets: Map<AST, TemplateEntity>, symbols: Map<TemplateEntity, TmplAstTemplate>, nestingLevel: Map<ScopedNode, number>, scopedNodeEntities: Map<ScopedNode, ReadonlySet<TemplateEntity>>, usedPipes: Set<string>, eagerPipes: Set<string>, rawDeferred: [TmplAstDeferredBlock, Scope][]);
property target
readonly target: Target;
method getConsumerOfBinding
getConsumerOfBinding: ( binding: TmplAstBoundAttribute | TmplAstBoundEvent | TmplAstTextAttribute) => DirectiveT | TmplAstElement | TmplAstTemplate | null;
method getDeferBlocks
getDeferBlocks: () => TmplAstDeferredBlock[];
method getDeferredTriggerTarget
getDeferredTriggerTarget: ( block: TmplAstDeferredBlock, trigger: TmplAstDeferredTrigger) => TmplAstElement | null;
method getDefinitionNodeOfSymbol
getDefinitionNodeOfSymbol: (symbol: TemplateEntity) => ScopedNode | null;
method getDirectivesOfNode
getDirectivesOfNode: ( node: TmplAstElement | TmplAstTemplate) => DirectiveT[] | null;
method getEagerlyUsedDirectives
getEagerlyUsedDirectives: () => DirectiveT[];
method getEagerlyUsedPipes
getEagerlyUsedPipes: () => string[];
method getEntitiesInScope
getEntitiesInScope: (node: ScopedNode | null) => ReadonlySet<TemplateEntity>;
method getExpressionTarget
getExpressionTarget: (expr: AST) => TemplateEntity | null;
method getNestingLevel
getNestingLevel: (node: ScopedNode) => number;
method getReferenceTarget
getReferenceTarget: ( ref: TmplAstReference) => ReferenceTarget<DirectiveT> | null;
method getUsedDirectives
getUsedDirectives: () => DirectiveT[];
method getUsedPipes
getUsedPipes: () => string[];
method isDeferred
isDeferred: (element: TmplAstElement) => boolean;
class R3Identifiers
class R3Identifiers {}
property advance
static advance: ExternalReference;
property attachSourceLocations
static attachSourceLocations: ExternalReference;
property attribute
static attribute: ExternalReference;
property attributeInterpolate1
static attributeInterpolate1: ExternalReference;
property attributeInterpolate2
static attributeInterpolate2: ExternalReference;
property attributeInterpolate3
static attributeInterpolate3: ExternalReference;
property attributeInterpolate4
static attributeInterpolate4: ExternalReference;
property attributeInterpolate5
static attributeInterpolate5: ExternalReference;
property attributeInterpolate6
static attributeInterpolate6: ExternalReference;
property attributeInterpolate7
static attributeInterpolate7: ExternalReference;
property attributeInterpolate8
static attributeInterpolate8: ExternalReference;
property attributeInterpolateV
static attributeInterpolateV: ExternalReference;
property ChangeDetectionStrategy
static ChangeDetectionStrategy: ExternalReference;
property classMap
static classMap: ExternalReference;
property classMapInterpolate1
static classMapInterpolate1: ExternalReference;
property classMapInterpolate2
static classMapInterpolate2: ExternalReference;
property classMapInterpolate3
static classMapInterpolate3: ExternalReference;
property classMapInterpolate4
static classMapInterpolate4: ExternalReference;
property classMapInterpolate5
static classMapInterpolate5: ExternalReference;
property classMapInterpolate6
static classMapInterpolate6: ExternalReference;
property classMapInterpolate7
static classMapInterpolate7: ExternalReference;
property classMapInterpolate8
static classMapInterpolate8: ExternalReference;
property classMapInterpolateV
static classMapInterpolateV: ExternalReference;
property classProp
static classProp: ExternalReference;
property ComponentDeclaration
static ComponentDeclaration: ExternalReference;
property componentInstance
static componentInstance: ExternalReference;
property conditional
static conditional: ExternalReference;
property contentQuery
static contentQuery: ExternalReference;
property contentQuerySignal
static contentQuerySignal: ExternalReference;
property CopyDefinitionFeature
static CopyDefinitionFeature: ExternalReference;
property core
static core: ExternalReference;
property declareClassMetadata
static declareClassMetadata: ExternalReference;
property declareClassMetadataAsync
static declareClassMetadataAsync: ExternalReference;
property declareComponent
static declareComponent: ExternalReference;
property declareDirective
static declareDirective: ExternalReference;
property declareFactory
static declareFactory: ExternalReference;
property declareInjectable
static declareInjectable: ExternalReference;
property declareInjector
static declareInjector: ExternalReference;
property declareLet
static declareLet: ExternalReference;
property declareNgModule
static declareNgModule: ExternalReference;
property declarePipe
static declarePipe: ExternalReference;
property defer
static defer: ExternalReference;
property deferEnableTimerScheduling
static deferEnableTimerScheduling: ExternalReference;
property deferHydrateNever
static deferHydrateNever: ExternalReference;
property deferHydrateOnHover
static deferHydrateOnHover: ExternalReference;
property deferHydrateOnIdle
static deferHydrateOnIdle: ExternalReference;
property deferHydrateOnImmediate
static deferHydrateOnImmediate: ExternalReference;
property deferHydrateOnInteraction
static deferHydrateOnInteraction: ExternalReference;
property deferHydrateOnTimer
static deferHydrateOnTimer: ExternalReference;
property deferHydrateOnViewport
static deferHydrateOnViewport: ExternalReference;
property deferHydrateWhen
static deferHydrateWhen: ExternalReference;
property deferOnHover
static deferOnHover: ExternalReference;
property deferOnIdle
static deferOnIdle: ExternalReference;
property deferOnImmediate
static deferOnImmediate: ExternalReference;
property deferOnInteraction
static deferOnInteraction: ExternalReference;
property deferOnTimer
static deferOnTimer: ExternalReference;
property deferOnViewport
static deferOnViewport: ExternalReference;
property deferPrefetchOnHover
static deferPrefetchOnHover: ExternalReference;
property deferPrefetchOnIdle
static deferPrefetchOnIdle: ExternalReference;
property deferPrefetchOnImmediate
static deferPrefetchOnImmediate: ExternalReference;
property deferPrefetchOnInteraction
static deferPrefetchOnInteraction: ExternalReference;
property deferPrefetchOnTimer
static deferPrefetchOnTimer: ExternalReference;
property deferPrefetchOnViewport
static deferPrefetchOnViewport: ExternalReference;
property deferPrefetchWhen
static deferPrefetchWhen: ExternalReference;
property deferWhen
static deferWhen: ExternalReference;
property defineComponent
static defineComponent: ExternalReference;
property defineDirective
static defineDirective: ExternalReference;
property defineInjector
static defineInjector: ExternalReference;
property defineNgModule
static defineNgModule: ExternalReference;
property definePipe
static definePipe: ExternalReference;
property DirectiveDeclaration
static DirectiveDeclaration: ExternalReference;
property directiveInject
static directiveInject: ExternalReference;
property disableBindings
static disableBindings: ExternalReference;
property element
static element: ExternalReference;
property elementContainer
static elementContainer: ExternalReference;
property elementContainerEnd
static elementContainerEnd: ExternalReference;
property elementContainerStart
static elementContainerStart: ExternalReference;
property elementEnd
static elementEnd: ExternalReference;
property elementStart
static elementStart: ExternalReference;
property enableBindings
static enableBindings: ExternalReference;
property ExternalStylesFeature
static ExternalStylesFeature: ExternalReference;
property FactoryDeclaration
static FactoryDeclaration: ExternalReference;
property FactoryTarget
static FactoryTarget: ExternalReference;
property forwardRef
static forwardRef: ExternalReference;
property getComponentDepsFactory
static getComponentDepsFactory: ExternalReference;
property getCurrentView
static getCurrentView: ExternalReference;
property getInheritedFactory
static getInheritedFactory: ExternalReference;
property HostDirectivesFeature
static HostDirectivesFeature: ExternalReference;
property hostProperty
static hostProperty: ExternalReference;
property i18n
static i18n: ExternalReference;
property i18nApply
static i18nApply: ExternalReference;
property i18nAttributes
static i18nAttributes: ExternalReference;
property i18nEnd
static i18nEnd: ExternalReference;
property i18nExp
static i18nExp: ExternalReference;
property i18nPostprocess
static i18nPostprocess: ExternalReference;
property i18nStart
static i18nStart: ExternalReference;
property InheritDefinitionFeature
static InheritDefinitionFeature: ExternalReference;
property inject
static inject: ExternalReference;
property InjectableDeclaration
static InjectableDeclaration: ExternalReference;
property injectAttribute
static injectAttribute: ExternalReference;
property InjectorDeclaration
static InjectorDeclaration: ExternalReference;
property InjectorDef
static InjectorDef: ExternalReference;
property InputSignalBrandWriteType
static InputSignalBrandWriteType: { name: string; moduleName: string };
property InputTransformsFeatureFeature
static InputTransformsFeatureFeature: ExternalReference;
property invalidFactory
static invalidFactory: ExternalReference;
property invalidFactoryDep
static invalidFactoryDep: ExternalReference;
property listener
static listener: ExternalReference;
property loadQuery
static loadQuery: ExternalReference;
property ModuleWithProviders
static ModuleWithProviders: ExternalReference;
property namespaceHTML
static namespaceHTML: ExternalReference;
property namespaceMathML
static namespaceMathML: ExternalReference;
property namespaceSVG
static namespaceSVG: ExternalReference;
property NEW_METHOD
static NEW_METHOD: string;
property nextContext
static nextContext: ExternalReference;
property NgModuleDeclaration
static NgModuleDeclaration: ExternalReference;
property NgOnChangesFeature
static NgOnChangesFeature: ExternalReference;
property ɵɵdefineInjectable
static ɵɵdefineInjectable: ExternalReference;
property PATCH_DEPS
static PATCH_DEPS: string;
property pipe
static pipe: ExternalReference;
property pipeBind1
static pipeBind1: ExternalReference;
property pipeBind2
static pipeBind2: ExternalReference;
property pipeBind3
static pipeBind3: ExternalReference;
property pipeBind4
static pipeBind4: ExternalReference;
property pipeBindV
static pipeBindV: ExternalReference;
property PipeDeclaration
static PipeDeclaration: ExternalReference;
property projection
static projection: ExternalReference;
property projectionDef
static projectionDef: ExternalReference;
property property
static property: ExternalReference;
property propertyInterpolate
static propertyInterpolate: ExternalReference;
property propertyInterpolate1
static propertyInterpolate1: ExternalReference;
property propertyInterpolate2
static propertyInterpolate2: ExternalReference;
property propertyInterpolate3
static propertyInterpolate3: ExternalReference;
property propertyInterpolate4
static propertyInterpolate4: ExternalReference;
property propertyInterpolate5
static propertyInterpolate5: ExternalReference;
property propertyInterpolate6
static propertyInterpolate6: ExternalReference;
property propertyInterpolate7
static propertyInterpolate7: ExternalReference;
property propertyInterpolate8
static propertyInterpolate8: ExternalReference;
property propertyInterpolateV
static propertyInterpolateV: ExternalReference;
property ProvidersFeature
static ProvidersFeature: ExternalReference;
property pureFunction0
static pureFunction0: ExternalReference;
property pureFunction1
static pureFunction1: ExternalReference;
property pureFunction2
static pureFunction2: ExternalReference;
property pureFunction3
static pureFunction3: ExternalReference;
property pureFunction4
static pureFunction4: ExternalReference;
property pureFunction5
static pureFunction5: ExternalReference;
property pureFunction6
static pureFunction6: ExternalReference;
property pureFunction7
static pureFunction7: ExternalReference;
property pureFunction8
static pureFunction8: ExternalReference;
property pureFunctionV
static pureFunctionV: ExternalReference;
property queryAdvance
static queryAdvance: ExternalReference;
property queryRefresh
static queryRefresh: ExternalReference;
property readContextLet
static readContextLet: ExternalReference;
property reference
static reference: ExternalReference;
property registerNgModuleType
static registerNgModuleType: ExternalReference;
property repeater
static repeater: ExternalReference;
property repeaterCreate
static repeaterCreate: ExternalReference;
property repeaterTrackByIdentity
static repeaterTrackByIdentity: ExternalReference;
property repeaterTrackByIndex
static repeaterTrackByIndex: ExternalReference;
property replaceMetadata
static replaceMetadata: ExternalReference;
property resetView
static resetView: ExternalReference;
property resolveBody
static resolveBody: ExternalReference;
property resolveDocument
static resolveDocument: ExternalReference;
property resolveForwardRef
static resolveForwardRef: ExternalReference;
property resolveWindow
static resolveWindow: ExternalReference;
property restoreView
static restoreView: ExternalReference;
property sanitizeHtml
static sanitizeHtml: ExternalReference;
property sanitizeResourceUrl
static sanitizeResourceUrl: ExternalReference;
property sanitizeScript
static sanitizeScript: ExternalReference;
property sanitizeStyle
static sanitizeStyle: ExternalReference;
property sanitizeUrl
static sanitizeUrl: ExternalReference;
property sanitizeUrlOrResourceUrl
static sanitizeUrlOrResourceUrl: ExternalReference;
property setClassDebugInfo
static setClassDebugInfo: ExternalReference;
property setClassMetadata
static setClassMetadata: ExternalReference;
property setClassMetadataAsync
static setClassMetadataAsync: ExternalReference;
property setComponentScope
static setComponentScope: ExternalReference;
property setNgModuleScope
static setNgModuleScope: ExternalReference;
property storeLet
static storeLet: ExternalReference;
property styleMap
static styleMap: ExternalReference;
property styleMapInterpolate1
static styleMapInterpolate1: ExternalReference;
property styleMapInterpolate2
static styleMapInterpolate2: ExternalReference;
property styleMapInterpolate3
static styleMapInterpolate3: ExternalReference;
property styleMapInterpolate4
static styleMapInterpolate4: ExternalReference;
property styleMapInterpolate5
static styleMapInterpolate5: ExternalReference;
property styleMapInterpolate6
static styleMapInterpolate6: ExternalReference;
property styleMapInterpolate7
static styleMapInterpolate7: ExternalReference;
property styleMapInterpolate8
static styleMapInterpolate8: ExternalReference;
property styleMapInterpolateV
static styleMapInterpolateV: ExternalReference;
property styleProp
static styleProp: ExternalReference;
property stylePropInterpolate1
static stylePropInterpolate1: ExternalReference;
property stylePropInterpolate2
static stylePropInterpolate2: ExternalReference;
property stylePropInterpolate3
static stylePropInterpolate3: ExternalReference;
property stylePropInterpolate4
static stylePropInterpolate4: ExternalReference;
property stylePropInterpolate5
static stylePropInterpolate5: ExternalReference;
property stylePropInterpolate6
static stylePropInterpolate6: ExternalReference;
property stylePropInterpolate7
static stylePropInterpolate7: ExternalReference;
property stylePropInterpolate8
static stylePropInterpolate8: ExternalReference;
property stylePropInterpolateV
static stylePropInterpolateV: ExternalReference;
property syntheticHostListener
static syntheticHostListener: ExternalReference;
property syntheticHostProperty
static syntheticHostProperty: ExternalReference;
property templateCreate
static templateCreate: ExternalReference;
property templateRefExtractor
static templateRefExtractor: ExternalReference;
property text
static text: ExternalReference;
property textInterpolate
static textInterpolate: ExternalReference;
property textInterpolate1
static textInterpolate1: ExternalReference;
property textInterpolate2
static textInterpolate2: ExternalReference;
property textInterpolate3
static textInterpolate3: ExternalReference;
property textInterpolate4
static textInterpolate4: ExternalReference;
property textInterpolate5
static textInterpolate5: ExternalReference;
property textInterpolate6
static textInterpolate6: ExternalReference;
property textInterpolate7
static textInterpolate7: ExternalReference;
property textInterpolate8
static textInterpolate8: ExternalReference;
property textInterpolateV
static textInterpolateV: ExternalReference;
property TRANSFORM_METHOD
static TRANSFORM_METHOD: string;
property trustConstantHtml
static trustConstantHtml: ExternalReference;
property trustConstantResourceUrl
static trustConstantResourceUrl: ExternalReference;
property twoWayBindingSet
static twoWayBindingSet: ExternalReference;
property twoWayListener
static twoWayListener: ExternalReference;
property twoWayProperty
static twoWayProperty: ExternalReference;
property UnwrapDirectiveSignalInputs
static UnwrapDirectiveSignalInputs: { name: string; moduleName: string };
property unwrapWritableSignal
static unwrapWritableSignal: { name: string; moduleName: string };
property validateIframeAttribute
static validateIframeAttribute: ExternalReference;
property ViewEncapsulation
static ViewEncapsulation: ExternalReference;
property viewQuery
static viewQuery: ExternalReference;
property viewQuerySignal
static viewQuerySignal: ExternalReference;
class R3TargetBinder
class R3TargetBinder<DirectiveT extends DirectiveMeta> implements TargetBinder<DirectiveT> {}
Processes
Target
s with a given set of directives and performs a binding operation, which returns an object similar to TypeScript'sts.TypeChecker
that contains knowledge about the target.
constructor
constructor(directiveMatcher: SelectorMatcher<DirectiveT[]>);
method bind
bind: (target: Target) => BoundTarget<DirectiveT>;
Perform a binding operation on the given
Target
and return aBoundTarget
which contains metadata about the types referenced in the template.
class ReadKeyExpr
class ReadKeyExpr extends Expression {}
constructor
constructor( receiver: Expression, index: Expression, type?: Type, sourceSpan?: ParseSourceSpan);
property index
index: Expression;
property receiver
receiver: Expression;
method clone
clone: () => ReadKeyExpr;
method isConstant
isConstant: () => boolean;
method isEquivalent
isEquivalent: (e: Expression) => boolean;
method set
set: (value: Expression) => WriteKeyExpr;
method visitExpression
visitExpression: (visitor: ExpressionVisitor, context: any) => any;
class ReadPropExpr
class ReadPropExpr extends Expression {}
constructor
constructor( receiver: Expression, name: string, type?: Type, sourceSpan?: ParseSourceSpan);
property index
readonly index: string;
property name
name: string;
property receiver
receiver: Expression;
method clone
clone: () => ReadPropExpr;
method isConstant
isConstant: () => boolean;
method isEquivalent
isEquivalent: (e: Expression) => boolean;
method set
set: (value: Expression) => WritePropExpr;
method visitExpression
visitExpression: (visitor: ExpressionVisitor, context: any) => any;
class ReadVarExpr
class ReadVarExpr extends Expression {}
constructor
constructor(name: string, type?: Type, sourceSpan?: ParseSourceSpan);
property name
name: string;
method clone
clone: () => ReadVarExpr;
method isConstant
isConstant: () => boolean;
method isEquivalent
isEquivalent: (e: Expression) => boolean;
method set
set: (value: Expression) => WriteVarExpr;
method visitExpression
visitExpression: (visitor: ExpressionVisitor, context: any) => any;
class RecursiveAstVisitor
class RecursiveAstVisitor implements AstVisitor {}
method visit
visit: (ast: AST, context?: any) => any;
method visitAll
visitAll: (asts: AST[], context: any) => any;
method visitBinary
visitBinary: (ast: Binary, context: any) => any;
method visitCall
visitCall: (ast: Call, context: any) => any;
method visitChain
visitChain: (ast: Chain, context: any) => any;
method visitConditional
visitConditional: (ast: Conditional, context: any) => any;
method visitImplicitReceiver
visitImplicitReceiver: (ast: ThisReceiver, context: any) => any;
method visitInterpolation
visitInterpolation: (ast: Interpolation, context: any) => any;
method visitKeyedRead
visitKeyedRead: (ast: KeyedRead, context: any) => any;
method visitKeyedWrite
visitKeyedWrite: (ast: KeyedWrite, context: any) => any;
method visitLiteralArray
visitLiteralArray: (ast: LiteralArray, context: any) => any;
method visitLiteralMap
visitLiteralMap: (ast: LiteralMap, context: any) => any;
method visitLiteralPrimitive
visitLiteralPrimitive: (ast: LiteralPrimitive, context: any) => any;
method visitNonNullAssert
visitNonNullAssert: (ast: NonNullAssert, context: any) => any;
method visitPipe
visitPipe: (ast: BindingPipe, context: any) => any;
method visitPrefixNot
visitPrefixNot: (ast: PrefixNot, context: any) => any;
method visitPropertyRead
visitPropertyRead: (ast: PropertyRead, context: any) => any;
method visitPropertyWrite
visitPropertyWrite: (ast: PropertyWrite, context: any) => any;
method visitSafeCall
visitSafeCall: (ast: SafeCall, context: any) => any;
method visitSafeKeyedRead
visitSafeKeyedRead: (ast: SafeKeyedRead, context: any) => any;
method visitSafePropertyRead
visitSafePropertyRead: (ast: SafePropertyRead, context: any) => any;
method visitThisReceiver
visitThisReceiver: (ast: ThisReceiver, context: any) => any;
method visitTypeofExpression
visitTypeofExpression: (ast: TypeofExpression, context: any) => void;
method visitUnary
visitUnary: (ast: Unary, context: any) => any;
class RecursiveVisitor
class RecursiveVisitor implements Visitor {}
constructor
constructor();
method visitAttribute
visitAttribute: (ast: Attribute, context: any) => any;
method visitBlock
visitBlock: (block: Block, context: any) => any;
method visitBlockParameter
visitBlockParameter: (ast: BlockParameter, context: any) => any;
method visitComment
visitComment: (ast: Comment_2, context: any) => any;
method visitElement
visitElement: (ast: Element_2, context: any) => any;
method visitExpansion
visitExpansion: (ast: Expansion, context: any) => any;
method visitExpansionCase
visitExpansionCase: (ast: ExpansionCase, context: any) => any;
method visitLetDeclaration
visitLetDeclaration: (decl: LetDeclaration, context: any) => void;
method visitText
visitText: (ast: Text_2, context: any) => any;
class ResourceLoader
abstract class ResourceLoader {}
An interface for retrieving documents by URL that the compiler uses to load templates.
This is an abstract class, rather than an interface, so that it can be used as injection token.
method get
abstract get: (url: string) => Promise<string> | string;
class ReturnStatement
class ReturnStatement extends Statement {}
constructor
constructor( value: Expression, sourceSpan?: ParseSourceSpan, leadingComments?: LeadingComment[]);
property value
value: Expression;
method isEquivalent
isEquivalent: (stmt: Statement) => boolean;
method visitStatement
visitStatement: (visitor: StatementVisitor, context: any) => any;
class SafeCall
class SafeCall extends AST {}
constructor
constructor( span: ParseSpan, sourceSpan: AbsoluteSourceSpan, receiver: AST, args: AST[], argumentSpan: AbsoluteSourceSpan);
property args
args: AST[];
property argumentSpan
argumentSpan: AbsoluteSourceSpan;
property receiver
receiver: AST;
method visit
visit: (visitor: AstVisitor, context?: any) => any;
class SafeKeyedRead
class SafeKeyedRead extends AST {}
constructor
constructor( span: ParseSpan, sourceSpan: AbsoluteSourceSpan, receiver: AST, key: AST);
property key
key: AST;
property receiver
receiver: AST;
method visit
visit: (visitor: AstVisitor, context?: any) => any;
class SafePropertyRead
class SafePropertyRead extends ASTWithName {}
constructor
constructor( span: ParseSpan, sourceSpan: AbsoluteSourceSpan, nameSpan: AbsoluteSourceSpan, receiver: AST, name: string);
property name
name: string;
property receiver
receiver: AST;
method visit
visit: (visitor: AstVisitor, context?: any) => any;
class SelectorContext
class SelectorContext<T = any> {}
constructor
constructor( selector: CssSelector, cbContext: {}, listContext: SelectorListContext);
property cbContext
cbContext: {};
property listContext
listContext: SelectorListContext;
property notSelectors
notSelectors: CssSelector[];
property selector
selector: CssSelector;
method finalize
finalize: ( cssSelector: CssSelector, callback: (c: CssSelector, a: T) => void) => boolean;
class SelectorListContext
class SelectorListContext {}
constructor
constructor(selectors: CssSelector[]);
property alreadyMatched
alreadyMatched: boolean;
property selectors
selectors: CssSelector[];
class SelectorMatcher
class SelectorMatcher<T = any> {}
Reads a list of CssSelectors and allows to calculate which ones are contained in a given CssSelector.
method addSelectables
addSelectables: (cssSelectors: CssSelector[], callbackCtxt?: T) => void;
method createNotMatcher
static createNotMatcher: (notSelectors: CssSelector[]) => SelectorMatcher<null>;
method match
match: ( cssSelector: CssSelector, matchedCallback: (c: CssSelector, a: T) => void) => boolean;
Find the objects that have been added via
addSelectable
whose css selector is contained in the given css selector.Parameter cssSelector
A css selector
Parameter matchedCallback
This callback will be called with the object handed into
addSelectable
boolean true if a match was found
class Serializer
abstract class Serializer {}
method createNameMapper
createNameMapper: (message: i18n.Message) => PlaceholderMapper | null;
method digest
abstract digest: (message: i18n.Message) => string;
method load
abstract load: ( content: string, url: string) => { locale: string | null; i18nNodesByMsgId: { [msgId: string]: Node_3[] } };
method write
abstract write: (messages: i18n.Message[], locale: string | null) => string;
class SplitInterpolation
class SplitInterpolation {}
constructor
constructor( strings: InterpolationPiece[], expressions: InterpolationPiece[], offsets: number[]);
property expressions
expressions: InterpolationPiece[];
property offsets
offsets: number[];
property strings
strings: InterpolationPiece[];
class Statement
abstract class Statement {}
constructor
constructor( modifiers?: StmtModifier, sourceSpan?: ParseSourceSpan, leadingComments?: LeadingComment[]);
property leadingComments
leadingComments?: LeadingComment[];
property modifiers
modifiers: StmtModifier;
property sourceSpan
sourceSpan: ParseSourceSpan;
method addLeadingComment
addLeadingComment: (leadingComment: LeadingComment) => void;
method hasModifier
hasModifier: (modifier: StmtModifier) => boolean;
method isEquivalent
abstract isEquivalent: (stmt: Statement) => boolean;
Calculates whether this statement produces the same value as the given statement. Note: We don't check Types nor ParseSourceSpans nor function arguments.
method visitStatement
abstract visitStatement: (visitor: StatementVisitor, context: any) => any;
class TaggedTemplateExpr
class TaggedTemplateExpr extends Expression {}
constructor
constructor( tag: Expression, template: TemplateLiteral, type?: Type, sourceSpan?: ParseSourceSpan);
property tag
tag: Expression;
property template
template: TemplateLiteral;
method clone
clone: () => TaggedTemplateExpr;
method isConstant
isConstant: () => boolean;
method isEquivalent
isEquivalent: (e: Expression) => boolean;
method visitExpression
visitExpression: (visitor: ExpressionVisitor, context: any) => any;
class TemplateBindingParseResult
class TemplateBindingParseResult {}
constructor
constructor( templateBindings: TemplateBinding[], warnings: string[], errors: ParserError[]);
property errors
errors: ParserError[];
property templateBindings
templateBindings: TemplateBinding[];
property warnings
warnings: string[];
class TemplateLiteral
class TemplateLiteral {}
constructor
constructor(elements: TemplateLiteralElement[], expressions: Expression[]);
property elements
elements: TemplateLiteralElement[];
property expressions
expressions: Expression[];
method clone
clone: () => TemplateLiteral;
class TemplateLiteralElement
class TemplateLiteralElement {}
constructor
constructor(text: string, sourceSpan?: ParseSourceSpan, rawText?: string);
property rawText
rawText: string;
property sourceSpan
sourceSpan?: ParseSourceSpan;
property text
text: string;
method clone
clone: () => TemplateLiteralElement;
class Text
class Text_2 extends NodeWithI18n {}
constructor
constructor( value: string, sourceSpan: ParseSourceSpan, tokens: InterpolatedTextToken[], i18n?: I18nMeta_2);
property tokens
tokens: InterpolatedTextToken[];
property value
value: string;
method visit
visit: (visitor: Visitor, context: any) => any;
class ThisReceiver
class ThisReceiver extends ImplicitReceiver {}
Receiver when something is accessed through
this
(e.g.this.foo
). Note that this class inherits fromImplicitReceiver
, because accessing something throughthis
is treated the same as accessing it implicitly inside of an Angular template (e.g.[attr.title]="this.title"
is the same as[attr.title]="title"
.). Inheriting allows for thethis
accesses to be treated the same as implicit ones, except for a couple of exceptions like$event
and$any
. TODO: we should find a way for this class not to extend fromImplicitReceiver
in the future.
method visit
visit: (visitor: AstVisitor, context?: any) => any;
class TmplAstBlockNode
class TmplAstBlockNode {}
constructor
constructor( nameSpan: ParseSourceSpan, sourceSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan);
property endSourceSpan
endSourceSpan: ParseSourceSpan;
property nameSpan
nameSpan: ParseSourceSpan;
property sourceSpan
sourceSpan: ParseSourceSpan;
property startSourceSpan
startSourceSpan: ParseSourceSpan;
class TmplAstBoundAttribute
class TmplAstBoundAttribute implements TmplAstNode {}
constructor
constructor( name: string, type: BindingType, securityContext: SecurityContext, value: AST, unit: string, sourceSpan: ParseSourceSpan, keySpan: ParseSourceSpan, valueSpan: ParseSourceSpan, i18n: I18nMeta_2);
property i18n
i18n: I18nMeta_2;
property keySpan
readonly keySpan: ParseSourceSpan;
property name
name: string;
property securityContext
securityContext: SecurityContext;
property sourceSpan
sourceSpan: ParseSourceSpan;
property type
type: BindingType;
property unit
unit: string;
property value
value: AST;
property valueSpan
valueSpan: ParseSourceSpan;
method fromBoundElementProperty
static fromBoundElementProperty: ( prop: BoundElementProperty, i18n?: I18nMeta_2) => TmplAstBoundAttribute;
method visit
visit: <Result>(visitor: TmplAstVisitor<Result>) => Result;
class TmplAstBoundDeferredTrigger
class TmplAstBoundDeferredTrigger extends TmplAstDeferredTrigger {}
constructor
constructor( value: AST, sourceSpan: ParseSourceSpan, prefetchSpan: ParseSourceSpan, whenSourceSpan: ParseSourceSpan, hydrateSpan: ParseSourceSpan);
property value
value: AST;
class TmplAstBoundEvent
class TmplAstBoundEvent implements TmplAstNode {}
constructor
constructor( name: string, type: ParsedEventType, handler: AST, target: string, phase: string, sourceSpan: ParseSourceSpan, handlerSpan: ParseSourceSpan, keySpan: ParseSourceSpan);
property handler
handler: AST;
property handlerSpan
handlerSpan: ParseSourceSpan;
property keySpan
readonly keySpan: ParseSourceSpan;
property name
name: string;
property phase
phase: string;
property sourceSpan
sourceSpan: ParseSourceSpan;
property target
target: string;
property type
type: ParsedEventType;
method fromParsedEvent
static fromParsedEvent: (event: ParsedEvent) => TmplAstBoundEvent;
method visit
visit: <Result>(visitor: TmplAstVisitor<Result>) => Result;
class TmplAstBoundText
class TmplAstBoundText implements TmplAstNode {}
constructor
constructor(value: AST, sourceSpan: ParseSourceSpan, i18n?: I18nMeta_2);
property i18n
i18n?: I18nMeta_2;
property sourceSpan
sourceSpan: ParseSourceSpan;
property value
value: AST;
method visit
visit: <Result>(visitor: TmplAstVisitor<Result>) => Result;
class TmplAstContent
class TmplAstContent implements TmplAstNode {}
constructor
constructor( selector: string, attributes: TmplAstTextAttribute[], children: TmplAstNode[], sourceSpan: ParseSourceSpan, i18n?: I18nMeta_2);
property attributes
attributes: TmplAstTextAttribute[];
property children
children: TmplAstNode[];
property i18n
i18n?: I18nMeta_2;
property name
readonly name: string;
property selector
selector: string;
property sourceSpan
sourceSpan: ParseSourceSpan;
method visit
visit: <Result>(visitor: TmplAstVisitor<Result>) => Result;
class TmplAstDeferredBlock
class TmplAstDeferredBlock extends TmplAstBlockNode implements TmplAstNode {}
constructor
constructor( children: TmplAstNode[], triggers: TmplAstDeferredBlockTriggers, prefetchTriggers: TmplAstDeferredBlockTriggers, hydrateTriggers: TmplAstDeferredBlockTriggers, placeholder: TmplAstDeferredBlockPlaceholder, loading: TmplAstDeferredBlockLoading, error: TmplAstDeferredBlockError, nameSpan: ParseSourceSpan, sourceSpan: ParseSourceSpan, mainBlockSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan, i18n?: I18nMeta_2);
property children
children: TmplAstNode[];
property error
error: TmplAstDeferredBlockError;
property hydrateTriggers
readonly hydrateTriggers: Readonly<TmplAstDeferredBlockTriggers>;
property i18n
i18n?: I18nMeta_2;
property loading
loading: TmplAstDeferredBlockLoading;
property mainBlockSpan
mainBlockSpan: ParseSourceSpan;
property placeholder
placeholder: TmplAstDeferredBlockPlaceholder;
property prefetchTriggers
readonly prefetchTriggers: Readonly<TmplAstDeferredBlockTriggers>;
property triggers
readonly triggers: Readonly<TmplAstDeferredBlockTriggers>;
method visit
visit: <Result>(visitor: TmplAstVisitor<Result>) => Result;
method visitAll
visitAll: (visitor: TmplAstVisitor<unknown>) => void;
class TmplAstDeferredBlockError
class TmplAstDeferredBlockError extends TmplAstBlockNode implements TmplAstNode {}
constructor
constructor( children: TmplAstNode[], nameSpan: ParseSourceSpan, sourceSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan, i18n?: I18nMeta_2);
property children
children: TmplAstNode[];
property i18n
i18n?: I18nMeta_2;
method visit
visit: <Result>(visitor: TmplAstVisitor<Result>) => Result;
class TmplAstDeferredBlockLoading
class TmplAstDeferredBlockLoading extends TmplAstBlockNode implements TmplAstNode {}
constructor
constructor( children: TmplAstNode[], afterTime: number, minimumTime: number, nameSpan: ParseSourceSpan, sourceSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan, i18n?: I18nMeta_2);
property afterTime
afterTime: number;
property children
children: TmplAstNode[];
property i18n
i18n?: I18nMeta_2;
property minimumTime
minimumTime: number;
method visit
visit: <Result>(visitor: TmplAstVisitor<Result>) => Result;
class TmplAstDeferredBlockPlaceholder
class TmplAstDeferredBlockPlaceholder extends TmplAstBlockNode implements TmplAstNode {}
constructor
constructor( children: TmplAstNode[], minimumTime: number, nameSpan: ParseSourceSpan, sourceSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan, i18n?: I18nMeta_2);
property children
children: TmplAstNode[];
property i18n
i18n?: I18nMeta_2;
property minimumTime
minimumTime: number;
method visit
visit: <Result>(visitor: TmplAstVisitor<Result>) => Result;
class TmplAstDeferredTrigger
abstract class TmplAstDeferredTrigger implements TmplAstNode {}
constructor
constructor( nameSpan: ParseSourceSpan, sourceSpan: ParseSourceSpan, prefetchSpan: ParseSourceSpan, whenOrOnSourceSpan: ParseSourceSpan, hydrateSpan: ParseSourceSpan);
property hydrateSpan
hydrateSpan: ParseSourceSpan;
property nameSpan
nameSpan: ParseSourceSpan;
property prefetchSpan
prefetchSpan: ParseSourceSpan;
property sourceSpan
sourceSpan: ParseSourceSpan;
property whenOrOnSourceSpan
whenOrOnSourceSpan: ParseSourceSpan;
method visit
visit: <Result>(visitor: TmplAstVisitor<Result>) => Result;
class TmplAstElement
class TmplAstElement implements TmplAstNode {}
constructor
constructor( name: string, attributes: TmplAstTextAttribute[], inputs: TmplAstBoundAttribute[], outputs: TmplAstBoundEvent[], children: TmplAstNode[], references: TmplAstReference[], sourceSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan, i18n?: I18nMeta_2);
property attributes
attributes: TmplAstTextAttribute[];
property children
children: TmplAstNode[];
property endSourceSpan
endSourceSpan: ParseSourceSpan;
property i18n
i18n?: I18nMeta_2;
property inputs
inputs: TmplAstBoundAttribute[];
property name
name: string;
property outputs
outputs: TmplAstBoundEvent[];
property references
references: TmplAstReference[];
property sourceSpan
sourceSpan: ParseSourceSpan;
property startSourceSpan
startSourceSpan: ParseSourceSpan;
method visit
visit: <Result>(visitor: TmplAstVisitor<Result>) => Result;
class TmplAstForLoopBlock
class TmplAstForLoopBlock extends TmplAstBlockNode implements TmplAstNode {}
constructor
constructor( item: TmplAstVariable, expression: ASTWithSource<AST>, trackBy: ASTWithSource<AST>, trackKeywordSpan: ParseSourceSpan, contextVariables: TmplAstVariable[], children: TmplAstNode[], empty: TmplAstForLoopBlockEmpty, sourceSpan: ParseSourceSpan, mainBlockSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan, nameSpan: ParseSourceSpan, i18n?: I18nMeta_2);
property children
children: TmplAstNode[];
property contextVariables
contextVariables: TmplAstVariable[];
property empty
empty: TmplAstForLoopBlockEmpty;
property expression
expression: ASTWithSource<AST>;
property i18n
i18n?: I18nMeta_2;
property item
item: TmplAstVariable;
property mainBlockSpan
mainBlockSpan: ParseSourceSpan;
property trackBy
trackBy: ASTWithSource<AST>;
property trackKeywordSpan
trackKeywordSpan: ParseSourceSpan;
method visit
visit: <Result>(visitor: TmplAstVisitor<Result>) => Result;
class TmplAstForLoopBlockEmpty
class TmplAstForLoopBlockEmpty extends TmplAstBlockNode implements TmplAstNode {}
constructor
constructor( children: TmplAstNode[], sourceSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan, nameSpan: ParseSourceSpan, i18n?: I18nMeta_2);
property children
children: TmplAstNode[];
property i18n
i18n?: I18nMeta_2;
method visit
visit: <Result>(visitor: TmplAstVisitor<Result>) => Result;
class TmplAstHoverDeferredTrigger
class TmplAstHoverDeferredTrigger extends TmplAstDeferredTrigger {}
constructor
constructor( reference: string, nameSpan: ParseSourceSpan, sourceSpan: ParseSourceSpan, prefetchSpan: ParseSourceSpan, onSourceSpan: ParseSourceSpan, hydrateSpan: ParseSourceSpan);
property reference
reference: string;
class TmplAstIcu
class TmplAstIcu implements TmplAstNode {}
constructor
constructor( vars: { [name: string]: TmplAstBoundText }, placeholders: { [name: string]: TmplAstBoundText | TmplAstText }, sourceSpan: ParseSourceSpan, i18n?: I18nMeta_2);
property i18n
i18n?: I18nMeta_2;
property placeholders
placeholders: { [name: string]: TmplAstBoundText | TmplAstText };
property sourceSpan
sourceSpan: ParseSourceSpan;
property vars
vars: { [name: string]: TmplAstBoundText };
method visit
visit: <Result>(visitor: TmplAstVisitor<Result>) => Result;
class TmplAstIdleDeferredTrigger
class TmplAstIdleDeferredTrigger extends TmplAstDeferredTrigger {}
class TmplAstIfBlock
class TmplAstIfBlock extends TmplAstBlockNode implements TmplAstNode {}
constructor
constructor( branches: TmplAstIfBlockBranch[], sourceSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan, nameSpan: ParseSourceSpan);
property branches
branches: TmplAstIfBlockBranch[];
method visit
visit: <Result>(visitor: TmplAstVisitor<Result>) => Result;
class TmplAstIfBlockBranch
class TmplAstIfBlockBranch extends TmplAstBlockNode implements TmplAstNode {}
constructor
constructor( expression: AST, children: TmplAstNode[], expressionAlias: TmplAstVariable, sourceSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan, nameSpan: ParseSourceSpan, i18n?: I18nMeta_2);
property children
children: TmplAstNode[];
property expression
expression: AST;
property expressionAlias
expressionAlias: TmplAstVariable;
property i18n
i18n?: I18nMeta_2;
method visit
visit: <Result>(visitor: TmplAstVisitor<Result>) => Result;
class TmplAstImmediateDeferredTrigger
class TmplAstImmediateDeferredTrigger extends TmplAstDeferredTrigger {}
class TmplAstInteractionDeferredTrigger
class TmplAstInteractionDeferredTrigger extends TmplAstDeferredTrigger {}
constructor
constructor( reference: string, nameSpan: ParseSourceSpan, sourceSpan: ParseSourceSpan, prefetchSpan: ParseSourceSpan, onSourceSpan: ParseSourceSpan, hydrateSpan: ParseSourceSpan);
property reference
reference: string;
class TmplAstLetDeclaration
class TmplAstLetDeclaration implements TmplAstNode {}
constructor
constructor( name: string, value: AST, sourceSpan: ParseSourceSpan, nameSpan: ParseSourceSpan, valueSpan: ParseSourceSpan);
property name
name: string;
property nameSpan
nameSpan: ParseSourceSpan;
property sourceSpan
sourceSpan: ParseSourceSpan;
property value
value: AST;
property valueSpan
valueSpan: ParseSourceSpan;
method visit
visit: <Result>(visitor: TmplAstVisitor<Result>) => Result;
class TmplAstNeverDeferredTrigger
class TmplAstNeverDeferredTrigger extends TmplAstDeferredTrigger {}
class TmplAstRecursiveVisitor
class TmplAstRecursiveVisitor implements TmplAstVisitor<void> {}
method visitBoundAttribute
visitBoundAttribute: (attribute: TmplAstBoundAttribute) => void;
method visitBoundEvent
visitBoundEvent: (attribute: TmplAstBoundEvent) => void;
method visitBoundText
visitBoundText: (text: TmplAstBoundText) => void;
method visitContent
visitContent: (content: TmplAstContent) => void;
method visitDeferredBlock
visitDeferredBlock: (deferred: TmplAstDeferredBlock) => void;
method visitDeferredBlockError
visitDeferredBlockError: (block: TmplAstDeferredBlockError) => void;
method visitDeferredBlockLoading
visitDeferredBlockLoading: (block: TmplAstDeferredBlockLoading) => void;
method visitDeferredBlockPlaceholder
visitDeferredBlockPlaceholder: (block: TmplAstDeferredBlockPlaceholder) => void;
method visitDeferredTrigger
visitDeferredTrigger: (trigger: TmplAstDeferredTrigger) => void;
method visitElement
visitElement: (element: TmplAstElement) => void;
method visitForLoopBlock
visitForLoopBlock: (block: TmplAstForLoopBlock) => void;
method visitForLoopBlockEmpty
visitForLoopBlockEmpty: (block: TmplAstForLoopBlockEmpty) => void;
method visitIcu
visitIcu: (icu: TmplAstIcu) => void;
method visitIfBlock
visitIfBlock: (block: TmplAstIfBlock) => void;
method visitIfBlockBranch
visitIfBlockBranch: (block: TmplAstIfBlockBranch) => void;
method visitLetDeclaration
visitLetDeclaration: (decl: TmplAstLetDeclaration) => void;
method visitReference
visitReference: (reference: TmplAstReference) => void;
method visitSwitchBlock
visitSwitchBlock: (block: TmplAstSwitchBlock) => void;
method visitSwitchBlockCase
visitSwitchBlockCase: (block: TmplAstSwitchBlockCase) => void;
method visitTemplate
visitTemplate: (template: TmplAstTemplate) => void;
method visitText
visitText: (text: TmplAstText) => void;
method visitTextAttribute
visitTextAttribute: (attribute: TmplAstTextAttribute) => void;
method visitUnknownBlock
visitUnknownBlock: (block: TmplAstUnknownBlock) => void;
method visitVariable
visitVariable: (variable: TmplAstVariable) => void;
class TmplAstReference
class TmplAstReference implements TmplAstNode {}
constructor
constructor( name: string, value: string, sourceSpan: ParseSourceSpan, keySpan: ParseSourceSpan, valueSpan?: ParseSourceSpan);
property keySpan
readonly keySpan: ParseSourceSpan;
property name
name: string;
property sourceSpan
sourceSpan: ParseSourceSpan;
property value
value: string;
property valueSpan
valueSpan?: ParseSourceSpan;
method visit
visit: <Result>(visitor: TmplAstVisitor<Result>) => Result;
class TmplAstSwitchBlock
class TmplAstSwitchBlock extends TmplAstBlockNode implements TmplAstNode {}
constructor
constructor( expression: AST, cases: TmplAstSwitchBlockCase[], unknownBlocks: TmplAstUnknownBlock[], sourceSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan, nameSpan: ParseSourceSpan);
property cases
cases: TmplAstSwitchBlockCase[];
property expression
expression: AST;
property unknownBlocks
unknownBlocks: TmplAstUnknownBlock[];
These blocks are only captured to allow for autocompletion in the language service. They aren't meant to be processed in any other way.
method visit
visit: <Result>(visitor: TmplAstVisitor<Result>) => Result;
class TmplAstSwitchBlockCase
class TmplAstSwitchBlockCase extends TmplAstBlockNode implements TmplAstNode {}
constructor
constructor( expression: AST, children: TmplAstNode[], sourceSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan, nameSpan: ParseSourceSpan, i18n?: I18nMeta_2);
property children
children: TmplAstNode[];
property expression
expression: AST;
property i18n
i18n?: I18nMeta_2;
method visit
visit: <Result>(visitor: TmplAstVisitor<Result>) => Result;
class TmplAstTemplate
class TmplAstTemplate implements TmplAstNode {}
constructor
constructor( tagName: string, attributes: TmplAstTextAttribute[], inputs: TmplAstBoundAttribute[], outputs: TmplAstBoundEvent[], templateAttrs: (TmplAstBoundAttribute | TmplAstTextAttribute)[], children: TmplAstNode[], references: TmplAstReference[], variables: TmplAstVariable[], sourceSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan, i18n?: I18nMeta_2);
property attributes
attributes: TmplAstTextAttribute[];
property children
children: TmplAstNode[];
property endSourceSpan
endSourceSpan: ParseSourceSpan;
property i18n
i18n?: I18nMeta_2;
property inputs
inputs: TmplAstBoundAttribute[];
property outputs
outputs: TmplAstBoundEvent[];
property references
references: TmplAstReference[];
property sourceSpan
sourceSpan: ParseSourceSpan;
property startSourceSpan
startSourceSpan: ParseSourceSpan;
property tagName
tagName: string;
property templateAttrs
templateAttrs: (TmplAstBoundAttribute | TmplAstTextAttribute)[];
property variables
variables: TmplAstVariable[];
method visit
visit: <Result>(visitor: TmplAstVisitor<Result>) => Result;
class TmplAstText
class TmplAstText implements TmplAstNode {}
constructor
constructor(value: string, sourceSpan: ParseSourceSpan);
property sourceSpan
sourceSpan: ParseSourceSpan;
property value
value: string;
method visit
visit: <Result>(visitor: TmplAstVisitor<Result>) => Result;
class TmplAstTextAttribute
class TmplAstTextAttribute implements TmplAstNode {}
Represents a text attribute in the template.
valueSpan
may not be present in cases where there is no value<div a></div>
.keySpan
may also not be present for synthetic attributes from ICU expansions.
constructor
constructor( name: string, value: string, sourceSpan: ParseSourceSpan, keySpan: ParseSourceSpan, valueSpan?: ParseSourceSpan, i18n?: I18nMeta_2);
property i18n
i18n?: I18nMeta_2;
property keySpan
readonly keySpan: ParseSourceSpan;
property name
name: string;
property sourceSpan
sourceSpan: ParseSourceSpan;
property value
value: string;
property valueSpan
valueSpan?: ParseSourceSpan;
method visit
visit: <Result>(visitor: TmplAstVisitor<Result>) => Result;
class TmplAstTimerDeferredTrigger
class TmplAstTimerDeferredTrigger extends TmplAstDeferredTrigger {}
constructor
constructor( delay: number, nameSpan: ParseSourceSpan, sourceSpan: ParseSourceSpan, prefetchSpan: ParseSourceSpan, onSourceSpan: ParseSourceSpan, hydrateSpan: ParseSourceSpan);
property delay
delay: number;
class TmplAstUnknownBlock
class TmplAstUnknownBlock implements TmplAstNode {}
constructor
constructor( name: string, sourceSpan: ParseSourceSpan, nameSpan: ParseSourceSpan);
property name
name: string;
property nameSpan
nameSpan: ParseSourceSpan;
property sourceSpan
sourceSpan: ParseSourceSpan;
method visit
visit: <Result>(visitor: TmplAstVisitor<Result>) => Result;
class TmplAstVariable
class TmplAstVariable implements TmplAstNode {}
constructor
constructor( name: string, value: string, sourceSpan: ParseSourceSpan, keySpan: ParseSourceSpan, valueSpan?: ParseSourceSpan);
property keySpan
readonly keySpan: ParseSourceSpan;
property name
name: string;
property sourceSpan
sourceSpan: ParseSourceSpan;
property value
value: string;
property valueSpan
valueSpan?: ParseSourceSpan;
method visit
visit: <Result>(visitor: TmplAstVisitor<Result>) => Result;
class TmplAstViewportDeferredTrigger
class TmplAstViewportDeferredTrigger extends TmplAstDeferredTrigger {}
constructor
constructor( reference: string, nameSpan: ParseSourceSpan, sourceSpan: ParseSourceSpan, prefetchSpan: ParseSourceSpan, onSourceSpan: ParseSourceSpan, hydrateSpan: ParseSourceSpan);
property reference
reference: string;
class Token
class Token {}
constructor
constructor( index: number, end: number, type: TokenType, numValue: number, strValue: string);
property end
end: number;
property index
index: number;
property numValue
numValue: number;
property strValue
strValue: string;
property type
type: TokenType;
method isCharacter
isCharacter: (code: number) => boolean;
method isError
isError: () => boolean;
method isIdentifier
isIdentifier: () => boolean;
method isKeyword
isKeyword: () => boolean;
method isKeywordAs
isKeywordAs: () => boolean;
method isKeywordFalse
isKeywordFalse: () => boolean;
method isKeywordLet
isKeywordLet: () => boolean;
method isKeywordNull
isKeywordNull: () => boolean;
method isKeywordThis
isKeywordThis: () => boolean;
method isKeywordTrue
isKeywordTrue: () => boolean;
method isKeywordTypeof
isKeywordTypeof: () => boolean;
method isKeywordUndefined
isKeywordUndefined: () => boolean;
method isNumber
isNumber: () => boolean;
method isOperator
isOperator: (operator: string) => boolean;
method isPrivateIdentifier
isPrivateIdentifier: () => boolean;
method isString
isString: () => boolean;
method toNumber
toNumber: () => number;
method toString
toString: () => string | null;
class TransplantedType
class TransplantedType<T> extends Type {}
constructor
constructor(type: {}, modifiers?: TypeModifier);
property type
readonly type: {};
method visitType
visitType: (visitor: TypeVisitor, context: any) => any;
class TreeError
class TreeError extends ParseError {}
constructor
constructor(elementName: string, span: ParseSourceSpan, msg: string);
property elementName
elementName: string;
method create
static create: ( elementName: string | null, span: ParseSourceSpan, msg: string) => TreeError;
class Type
abstract class Type {}
constructor
constructor(modifiers?: TypeModifier);
property modifiers
modifiers: TypeModifier;
method hasModifier
hasModifier: (modifier: TypeModifier) => boolean;
method visitType
abstract visitType: (visitor: TypeVisitor, context: any) => any;
class TypeofExpr
class TypeofExpr extends Expression {}
constructor
constructor(expr: Expression, type?: Type, sourceSpan?: ParseSourceSpan);
property expr
expr: Expression;
method clone
clone: () => TypeofExpr;
method isConstant
isConstant: () => boolean;
method isEquivalent
isEquivalent: (e: Expression) => boolean;
method visitExpression
visitExpression: (visitor: ExpressionVisitor, context: any) => any;
class TypeofExpression
class TypeofExpression extends AST {}
constructor
constructor(span: ParseSpan, sourceSpan: AbsoluteSourceSpan, expression: AST);
property expression
expression: AST;
method visit
visit: (visitor: AstVisitor, context?: any) => any;
class Unary
class Unary extends Binary {}
For backwards compatibility reasons,
Unary
inherits fromBinary
and mimics the binary AST node that was originally used. This inheritance relation can be deleted in some future major, after consumers have been given a chance to fully support Unary.
property expr
expr: AST;
property left
left: never;
property operation
operation: never;
property operator
operator: string;
property right
right: never;
method createMinus
static createMinus: ( span: ParseSpan, sourceSpan: AbsoluteSourceSpan, expr: AST) => Unary;
Creates a unary minus expression "-x", represented as
Binary
using "0 - x".
method createPlus
static createPlus: ( span: ParseSpan, sourceSpan: AbsoluteSourceSpan, expr: AST) => Unary;
Creates a unary plus expression "+x", represented as
Binary
using "x - 0".
method visit
visit: (visitor: AstVisitor, context?: any) => any;
class UnaryOperatorExpr
class UnaryOperatorExpr extends Expression {}
constructor
constructor( operator: UnaryOperator, expr: Expression, type?: Type, sourceSpan?: ParseSourceSpan, parens?: boolean);
property expr
expr: Expression;
property operator
operator: UnaryOperator;
property parens
parens: boolean;
method clone
clone: () => UnaryOperatorExpr;
method isConstant
isConstant: () => boolean;
method isEquivalent
isEquivalent: (e: Expression) => boolean;
method visitExpression
visitExpression: (visitor: ExpressionVisitor, context: any) => any;
class VariableBinding
class VariableBinding {}
constructor
constructor( sourceSpan: AbsoluteSourceSpan, key: TemplateBindingIdentifier, value: TemplateBindingIdentifier);
Parameter sourceSpan
entire span of the binding.
Parameter key
name of the LHS along with its span.
Parameter value
optional value for the RHS along with its span.
property key
readonly key: TemplateBindingIdentifier;
property sourceSpan
readonly sourceSpan: AbsoluteSourceSpan;
property value
readonly value: TemplateBindingIdentifier;
class Version
class Version {}
constructor
constructor(full: string);
property full
full: string;
property major
readonly major: string;
property minor
readonly minor: string;
property patch
readonly patch: string;
class WrappedNodeExpr
class WrappedNodeExpr<T> extends Expression {}
constructor
constructor(node: {}, type?: Type, sourceSpan?: ParseSourceSpan);
property node
node: {};
method clone
clone: () => WrappedNodeExpr<T>;
method isConstant
isConstant: () => boolean;
method isEquivalent
isEquivalent: (e: Expression) => boolean;
method visitExpression
visitExpression: (visitor: ExpressionVisitor, context: any) => any;
class WriteKeyExpr
class WriteKeyExpr extends Expression {}
constructor
constructor( receiver: Expression, index: Expression, value: Expression, type?: Type, sourceSpan?: ParseSourceSpan);
property index
index: Expression;
property receiver
receiver: Expression;
property value
value: Expression;
method clone
clone: () => WriteKeyExpr;
method isConstant
isConstant: () => boolean;
method isEquivalent
isEquivalent: (e: Expression) => boolean;
method visitExpression
visitExpression: (visitor: ExpressionVisitor, context: any) => any;
class WritePropExpr
class WritePropExpr extends Expression {}
constructor
constructor( receiver: Expression, name: string, value: Expression, type?: Type, sourceSpan?: ParseSourceSpan);
property name
name: string;
property receiver
receiver: Expression;
property value
value: Expression;
method clone
clone: () => WritePropExpr;
method isConstant
isConstant: () => boolean;
method isEquivalent
isEquivalent: (e: Expression) => boolean;
method visitExpression
visitExpression: (visitor: ExpressionVisitor, context: any) => any;
class WriteVarExpr
class WriteVarExpr extends Expression {}
constructor
constructor( name: string, value: Expression, type?: Type, sourceSpan?: ParseSourceSpan);
property name
name: string;
property value
value: Expression;
method clone
clone: () => WriteVarExpr;
method isConstant
isConstant: () => boolean;
method isEquivalent
isEquivalent: (e: Expression) => boolean;
method toConstDecl
toConstDecl: () => DeclareVarStmt;
method toDeclStmt
toDeclStmt: (type?: Type | null, modifiers?: StmtModifier) => DeclareVarStmt;
method visitExpression
visitExpression: (visitor: ExpressionVisitor, context: any) => any;
class Xliff
class Xliff extends Serializer {}
class Xliff2
class Xliff2 extends Serializer {}
class Xmb
class Xmb extends Serializer {}
method createNameMapper
createNameMapper: (message: i18n.Message) => PlaceholderMapper;
method digest
digest: (message: i18n.Message) => string;
method load
load: ( content: string, url: string) => { locale: string; i18nNodesByMsgId: { [msgId: string]: Node_3[] } };
method write
write: (messages: i18n.Message[], locale: string | null) => string;
class XmlParser
class XmlParser extends Parser_2 {}
constructor
constructor();
method parse
parse: ( source: string, url: string, options?: TokenizeOptions) => ParseTreeResult;
class Xtb
class Xtb extends Serializer {}
method createNameMapper
createNameMapper: (message: i18n.Message) => PlaceholderMapper;
method digest
digest: (message: i18n.Message) => string;
method load
load: ( content: string, url: string) => { locale: string; i18nNodesByMsgId: { [msgId: string]: Node_3[] } };
method write
write: (messages: i18n.Message[], locale: string | null) => string;
Interfaces
interface AnimationTriggerNames
interface AnimationTriggerNames {}
A data structure which captures the animation trigger names that are statically resolvable and whether some names could not be statically evaluated.
property includesDynamicAnimations
includesDynamicAnimations: boolean;
property staticTriggerNames
staticTriggerNames: string[];
interface AstVisitor
interface AstVisitor {}
method visit
visit: (ast: AST, context?: any) => any;
This function is optionally defined to allow classes that implement this interface to selectively decide if the specified
ast
should be visited.Parameter ast
node to visit
Parameter context
context that gets passed to the node and all its children
method visitASTWithSource
visitASTWithSource: (ast: ASTWithSource, context: any) => any;
method visitBinary
visitBinary: (ast: Binary, context: any) => any;
method visitCall
visitCall: (ast: Call, context: any) => any;
method visitChain
visitChain: (ast: Chain, context: any) => any;
method visitConditional
visitConditional: (ast: Conditional, context: any) => any;
method visitImplicitReceiver
visitImplicitReceiver: (ast: ImplicitReceiver, context: any) => any;
method visitInterpolation
visitInterpolation: (ast: Interpolation, context: any) => any;
method visitKeyedRead
visitKeyedRead: (ast: KeyedRead, context: any) => any;
method visitKeyedWrite
visitKeyedWrite: (ast: KeyedWrite, context: any) => any;
method visitLiteralArray
visitLiteralArray: (ast: LiteralArray, context: any) => any;
method visitLiteralMap
visitLiteralMap: (ast: LiteralMap, context: any) => any;
method visitLiteralPrimitive
visitLiteralPrimitive: (ast: LiteralPrimitive, context: any) => any;
method visitNonNullAssert
visitNonNullAssert: (ast: NonNullAssert, context: any) => any;
method visitPipe
visitPipe: (ast: BindingPipe, context: any) => any;
method visitPrefixNot
visitPrefixNot: (ast: PrefixNot, context: any) => any;
method visitPropertyRead
visitPropertyRead: (ast: PropertyRead, context: any) => any;
method visitPropertyWrite
visitPropertyWrite: (ast: PropertyWrite, context: any) => any;
method visitSafeCall
visitSafeCall: (ast: SafeCall, context: any) => any;
method visitSafeKeyedRead
visitSafeKeyedRead: (ast: SafeKeyedRead, context: any) => any;
method visitSafePropertyRead
visitSafePropertyRead: (ast: SafePropertyRead, context: any) => any;
method visitThisReceiver
visitThisReceiver: (ast: ThisReceiver, context: any) => any;
The
visitThisReceiver
method is declared as optional for backwards compatibility. In an upcoming major release, this method will be made required.
method visitTypeofExpression
visitTypeofExpression: (ast: TypeofExpression, context: any) => any;
method visitUnary
visitUnary: (ast: Unary, context: any) => any;
The
visitUnary
method is declared as optional for backwards compatibility. In an upcoming major release, this method will be made required.
interface BoundTarget
interface BoundTarget<DirectiveT extends DirectiveMeta> {}
Result of performing the binding operation against a
Target
.The original
Target
is accessible, as well as a suite of methods for extracting binding information regarding theTarget
.Parameter DirectiveT
directive metadata type
property target
readonly target: Target;
Get the original
Target
that was bound.
method getConsumerOfBinding
getConsumerOfBinding: ( binding: TmplAstBoundAttribute | TmplAstBoundEvent | TmplAstTextAttribute) => DirectiveT | TmplAstElement | TmplAstTemplate | null;
For a given binding, get the entity to which the binding is being made.
This will either be a directive or the node itself.
method getDeferBlocks
getDeferBlocks: () => TmplAstDeferredBlock[];
Get a list of all
@defer
blocks used by the target.
method getDeferredTriggerTarget
getDeferredTriggerTarget: ( block: TmplAstDeferredBlock, trigger: TmplAstDeferredTrigger) => TmplAstElement | null;
Gets the element that a specific deferred block trigger is targeting.
Parameter block
Block that the trigger belongs to.
Parameter trigger
Trigger whose target is being looked up.
method getDefinitionNodeOfSymbol
getDefinitionNodeOfSymbol: (symbol: TemplateEntity) => ScopedNode | null;
Given a particular
Reference
orVariable
, get theScopedNode
which created it.All
Variable
s are defined on node, so this will always return a value for aVariable
from theTarget
. Returnsnull
otherwise.
method getDirectivesOfNode
getDirectivesOfNode: ( node: TmplAstElement | TmplAstTemplate) => DirectiveT[] | null;
For a given template node (either an
Element
or aTemplate
), get the set of directives which matched the node, if any.
method getEagerlyUsedDirectives
getEagerlyUsedDirectives: () => DirectiveT[];
Get a list of eagerly used directives from the target. Note: this list *excludes* directives from
@defer
blocks.
method getEagerlyUsedPipes
getEagerlyUsedPipes: () => string[];
Get a list of eagerly used pipes from the target. Note: this list *excludes* pipes from
@defer
blocks.
method getEntitiesInScope
getEntitiesInScope: (node: ScopedNode | null) => ReadonlySet<TemplateEntity>;
Get all
Reference
s andVariables
visible within the givenScopedNode
(or at the top level, ifnull
is passed).
method getExpressionTarget
getExpressionTarget: (expr: AST) => TemplateEntity | null;
If the given
AST
expression refers to aReference
orVariable
within theTarget
, then return that.Otherwise, returns
null
.This is only defined for
AST
expressions that read or write to a property of anImplicitReceiver
.
method getNestingLevel
getNestingLevel: (node: ScopedNode) => number;
Get the nesting level of a particular
ScopedNode
.This starts at 1 for top-level nodes within the
Target
and increases for nodes nested at deeper levels.
method getReferenceTarget
getReferenceTarget: ( ref: TmplAstReference) => ReferenceTarget<DirectiveT> | null;
For a given
Reference
, get the reference's target - either anElement
, aTemplate
, or a directive on a particular node.
method getUsedDirectives
getUsedDirectives: () => DirectiveT[];
Get a list of all the directives used by the target, including directives from
@defer
blocks.
method getUsedPipes
getUsedPipes: () => string[];
Get a list of all the pipes used by the target, including pipes from
@defer
blocks.
method isDeferred
isDeferred: (node: TmplAstElement) => boolean;
Whether a given node is located in a
@defer
block.
interface CompileIdentifierMetadata
interface CompileIdentifierMetadata {}
property reference
reference: any;
interface DeclareComponentTemplateInfo
interface DeclareComponentTemplateInfo {}
property content
content: string;
The string contents of the template.
This is the "logical" template string, after expansion of any escaped characters (for inline templates). This may differ from the actual template bytes as they appear in the .ts file.
property inlineTemplateLiteralExpression
inlineTemplateLiteralExpression: outputAst.Expression | null;
If the template was defined inline by a direct string literal, then this is that literal expression. Otherwise
null
, if the template was not defined inline or was not a literal.
property isInline
isInline: boolean;
Whether the template was inline (using
template
) or external (usingtemplateUrl
).
property sourceUrl
sourceUrl: string;
A full path to the file which contains the template.
This can be either the original .ts file if the template is inline, or the .html file if an external file was used.
interface DirectiveMeta
interface DirectiveMeta {}
Metadata regarding a directive that's needed to match it against template elements. This is provided by a consumer of the t2 APIs.
property animationTriggerNames
animationTriggerNames: AnimationTriggerNames | null;
The name of animations that the user defines in the component. Only includes the animation names.
property exportAs
exportAs: string[] | null;
Name under which the directive is exported, if any (exportAs in Angular).
Null otherwise
property inputs
inputs: InputOutputPropertySet;
Set of inputs which this directive claims.
Goes from property names to field names.
property isComponent
isComponent: boolean;
Whether the directive is a component.
property isStructural
isStructural: boolean;
Whether the directive is a structural directive (e.g.
<div *ngIf></div>
).
property name
name: string;
Name of the directive class (used for debugging).
property ngContentSelectors
ngContentSelectors: string[] | null;
If the directive is a component, includes the selectors of its
ng-content
elements.
property outputs
outputs: InputOutputPropertySet;
Set of outputs which this directive claims.
Goes from property names to field names.
property preserveWhitespaces
preserveWhitespaces: boolean;
Whether the template of the component preserves whitespaces.
property selector
selector: string | null;
The selector for the directive or
null
if there isn't one.
interface ExpressionVisitor
interface ExpressionVisitor {}
method visitArrowFunctionExpr
visitArrowFunctionExpr: (ast: ArrowFunctionExpr, context: any) => any;
method visitBinaryOperatorExpr
visitBinaryOperatorExpr: (ast: BinaryOperatorExpr, context: any) => any;
method visitCommaExpr
visitCommaExpr: (ast: CommaExpr, context: any) => any;
method visitConditionalExpr
visitConditionalExpr: (ast: ConditionalExpr, context: any) => any;
method visitDynamicImportExpr
visitDynamicImportExpr: (ast: DynamicImportExpr, context: any) => any;
method visitExternalExpr
visitExternalExpr: (ast: ExternalExpr, context: any) => any;
method visitFunctionExpr
visitFunctionExpr: (ast: FunctionExpr, context: any) => any;
method visitInstantiateExpr
visitInstantiateExpr: (ast: InstantiateExpr, context: any) => any;
method visitInvokeFunctionExpr
visitInvokeFunctionExpr: (ast: InvokeFunctionExpr, context: any) => any;
method visitLiteralArrayExpr
visitLiteralArrayExpr: (ast: LiteralArrayExpr, context: any) => any;
method visitLiteralExpr
visitLiteralExpr: (ast: LiteralExpr, context: any) => any;
method visitLiteralMapExpr
visitLiteralMapExpr: (ast: LiteralMapExpr, context: any) => any;
method visitLocalizedString
visitLocalizedString: (ast: LocalizedString, context: any) => any;
method visitNotExpr
visitNotExpr: (ast: NotExpr, context: any) => any;
method visitReadKeyExpr
visitReadKeyExpr: (ast: ReadKeyExpr, context: any) => any;
method visitReadPropExpr
visitReadPropExpr: (ast: ReadPropExpr, context: any) => any;
method visitReadVarExpr
visitReadVarExpr: (ast: ReadVarExpr, context: any) => any;
method visitTaggedTemplateExpr
visitTaggedTemplateExpr: (ast: TaggedTemplateExpr, context: any) => any;
method visitTypeofExpr
visitTypeofExpr: (ast: TypeofExpr, context: any) => any;
method visitUnaryOperatorExpr
visitUnaryOperatorExpr: (ast: UnaryOperatorExpr, context: any) => any;
method visitWrappedNodeExpr
visitWrappedNodeExpr: (ast: WrappedNodeExpr<any>, context: any) => any;
method visitWriteKeyExpr
visitWriteKeyExpr: (expr: WriteKeyExpr, context: any) => any;
method visitWritePropExpr
visitWritePropExpr: (expr: WritePropExpr, context: any) => any;
method visitWriteVarExpr
visitWriteVarExpr: (expr: WriteVarExpr, context: any) => any;
interface InputOutputPropertySet
interface InputOutputPropertySet {}
A data structure which can indicate whether a given property name is present or not.
This is used to represent the set of inputs or outputs present on a directive, and allows the binder to query for the presence of a mapping for property names.
method hasBindingPropertyName
hasBindingPropertyName: (propertyName: string) => boolean;
interface InterpolationPiece
interface InterpolationPiece {}
interface LexerRange
interface LexerRange {}
interface MaybeForwardRefExpression
interface MaybeForwardRefExpression< T extends outputAst.Expression = outputAst.Expression> {}
Describes an expression that may have been wrapped in a
forwardRef()
guard.This is used when describing expressions that can refer to types that may eagerly reference types that have not yet been defined.
property expression
expression: T;
The unwrapped expression.
property forwardRef
forwardRef: ForwardRefHandling;
Specified whether the
expression
contains a reference to something that has not yet been defined, and whether the expression is still wrapped in aforwardRef()
call.If this value is
ForwardRefHandling.None
then theexpression
is safe to use as-is.Otherwise the
expression
was wrapped in a call toforwardRef()
and must not be eagerly evaluated. Instead it must be wrapped in a function closure that will be evaluated lazily to allow the definition of the expression to be evaluated first.In full AOT compilation it can be safe to unwrap the
forwardRef()
call up front if the expression will actually be evaluated lazily inside a function call after the value ofexpression
has been defined.But in other cases, such as partial AOT compilation or JIT compilation the expression will be evaluated eagerly in top level code so will need to continue to be wrapped in a
forwardRef()
call.
interface ParsedHostBindings
interface ParsedHostBindings {}
property attributes
attributes: { [key: string]: outputAst.Expression;};
property listeners
listeners: { [key: string]: string;};
property properties
properties: { [key: string]: string;};
property specialAttributes
specialAttributes: { styleAttr?: string; classAttr?: string;};
interface ParsedTemplate
interface ParsedTemplate {}
Information about the template which was extracted during parsing.
This contains the actual parsed template as well as any metadata collected during its parsing, some of which might be useful for re-parsing the template with different options.
property commentNodes
commentNodes?: t.Comment[];
Any R3 Comment Nodes extracted from the template when the
collectCommentNodes
parse template option is enabled.
property errors
errors: ParseError[] | null;
Any errors from parsing the template the first time.
null
if there are no errors. Otherwise, the array of errors is guaranteed to be non-empty.
property interpolationConfig
interpolationConfig?: InterpolationConfig;
How to parse interpolation markers.
property ngContentSelectors
ngContentSelectors: string[];
Any ng-content selectors extracted from the template.
property nodes
nodes: t.Node[];
The template AST, parsed from the template.
property preserveWhitespaces
preserveWhitespaces?: boolean;
Include whitespace nodes in the parsed output.
property styles
styles: string[];
Any inline styles extracted from the metadata.
property styleUrls
styleUrls: string[];
Any styleUrls extracted from the metadata.
interface ParseTemplateOptions
interface ParseTemplateOptions {}
Options that can be used to modify how a template is parsed by
parseTemplate()
.
property alwaysAttemptHtmlToR3AstConversion
alwaysAttemptHtmlToR3AstConversion?: boolean;
Whether to always attempt to convert the parsed HTML AST to an R3 AST, despite HTML or i18n Meta parse errors.
This option is useful in the context of the language service, where we want to get as much information as possible, despite any errors in the HTML. As an example, a user may be adding a new tag and expecting autocomplete on that tag. In this scenario, the HTML is in an errored state, as there is an incomplete open tag. However, we're still able to convert the HTML AST nodes to R3 AST nodes in order to provide information for the language service.
Note that even when
true
the HTML parse and i18n errors are still appended to the errors output, but this is done after converting the HTML AST to R3 AST.
property collectCommentNodes
collectCommentNodes?: boolean;
Include HTML Comment nodes in a top-level comments array on the returned R3 AST.
This option is required by tooling that needs to know the location of comment nodes within the AST. A concrete example is @angular-eslint which requires this in order to enable "eslint-disable" comments within HTML templates, which then allows users to turn off specific rules on a case by case basis, instead of for their whole project within a configuration file.
property enableBlockSyntax
enableBlockSyntax?: boolean;
Whether the @ block syntax is enabled.
property enableI18nLegacyMessageIdFormat
enableI18nLegacyMessageIdFormat?: boolean;
Render
$localize
message ids with additional legacy message ids.This option defaults to
true
but in the future the default will be flipped.For now set this option to false if you have migrated the translation files to use the new
$localize
message id format and you are not using compile time translation merging.
property enableLetSyntax
enableLetSyntax?: boolean;
Whether the
@let
syntax is enabled.
property escapedString
escapedString?: boolean;
If this text is stored in a JavaScript string, then we have to deal with escape sequences.
**Example 1:**
"abc\"def\nghi"- The
\"
must be converted to"
. - The\n
must be converted to a new line character in a token, but it should not increment the current line for source mapping.**Example 2:**
"abc\def"The line continuation (
\
followed by a newline) should be removed from a token but the new line should increment the current line for source mapping.
property i18nNormalizeLineEndingsInICUs
i18nNormalizeLineEndingsInICUs?: boolean;
If this text is stored in an external template (e.g. via
templateUrl
) then we need to decide whether or not to normalize the line-endings (from\r\n
to\n
) when processing ICU expressions.If
true
then we will normalize ICU expression line endings. The default isfalse
, but this will be switched in a future major release.
property interpolationConfig
interpolationConfig?: InterpolationConfig;
How to parse interpolation markers.
property leadingTriviaChars
leadingTriviaChars?: string[];
An array of characters that should be considered as leading trivia. Leading trivia are characters that are not important to the developer, and so should not be included in source-map segments. A common example is whitespace.
property preserveLineEndings
preserveLineEndings?: boolean;
Preserve original line endings instead of normalizing '\r\n' endings to '\n'.
property preserveSignificantWhitespace
preserveSignificantWhitespace?: boolean;
Preserve whitespace significant to rendering.
property preserveWhitespaces
preserveWhitespaces?: boolean;
Include whitespace nodes in the parsed output.
property range
range?: LexerRange;
The start and end point of the text to parse within the
source
string. The entiresource
string is parsed if this is not provided.
interface R3ClassDebugInfo
interface R3ClassDebugInfo {}
Info needed for runtime errors related to a class, such as the location in which the class is defined.
property className
className: outputAst.Expression;
A string literal containing the original class name as appears in its definition.
property filePath
filePath: outputAst.Expression | null;
A string literal containing the relative path of the file in which the class is defined.
The path is relative to the project root. The compiler does the best effort to find the project root (e.g., using the rootDir of tsconfig), but if it fails this field is set to null, indicating that the file path was failed to be computed. In this case, the downstream consumers of the debug info will usually ignore the
lineNumber
field as well and just show theclassName
. For security reasons we never show the absolute file path and prefer to just return null here.
property forbidOrphanRendering
forbidOrphanRendering: boolean;
Whether to check if this component is being rendered without its NgModule being loaded into the browser. Such checks is carried out only in dev mode.
property lineNumber
lineNumber: outputAst.Expression;
A number literal number containing the line number in which this class is defined.
property type
type: outputAst.Expression;
The class identifier
interface R3ClassMetadata
interface R3ClassMetadata {}
Metadata of a class which captures the original Angular decorators of a class. The original decorators are preserved in the generated code to allow TestBed APIs to recompile the class using the original decorator with a set of overrides applied.
property ctorParameters
ctorParameters: outputAst.Expression | null;
An expression representing the Angular decorators applied to constructor parameters, or
null
if there is no constructor.
property decorators
decorators: outputAst.Expression;
An expression representing the Angular decorators that were applied on the class.
property propDecorators
propDecorators: outputAst.Expression | null;
An expression representing the Angular decorators that were applied on the properties of the class, or
null
if no properties have decorators.
property type
type: outputAst.Expression;
The class type for which the metadata is captured.
interface R3CompiledExpression
interface R3CompiledExpression {}
Result of compilation of a render3 code unit, e.g. component, directive, pipe, etc.
property expression
expression: outputAst.Expression;
property statements
statements: outputAst.Statement[];
property type
type: outputAst.Type;
interface R3ComponentMetadata
interface R3ComponentMetadata<DeclarationT extends R3TemplateDependency> extends R3DirectiveMetadata {}
Information needed to compile a component for the render3 runtime.
property animations
animations: outputAst.Expression | null;
A collection of animation triggers that will be used in the component template.
property changeDetection
changeDetection: ChangeDetectionStrategy | outputAst.Expression | null;
Strategy used for detecting changes in the component.
In global compilation mode the value is ChangeDetectionStrategy if available as it is statically resolved during analysis phase. Whereas in local compilation mode the value is the expression as appears in the decorator.
property declarationListEmitMode
declarationListEmitMode: DeclarationListEmitMode;
Specifies how the 'directives' and/or
pipes
array, if generated, need to be emitted.
property declarations
declarations: DeclarationT[];
property defer
defer: R3ComponentDeferMetadata;
Metadata related to the deferred blocks in the component's template.
property encapsulation
encapsulation: ViewEncapsulation;
An encapsulation policy for the component's styling. Possible values: -
ViewEncapsulation.Emulated
: Apply modified component styles in order to emulate a native Shadow DOM CSS encapsulation behavior. -ViewEncapsulation.None
: Apply component styles globally without any sort of encapsulation. -ViewEncapsulation.ShadowDom
: Use the browser's native Shadow DOM API to encapsulate styles.
property externalStyles
externalStyles?: string[];
A collection of style paths for external stylesheets that will be applied and scoped to the component.
property i18nUseExternalIds
i18nUseExternalIds: boolean;
Whether translation variable name should contain external message id (used by Closure Compiler's output of
goog.getMsg
for transition period).
property interpolation
interpolation: InterpolationConfig;
Overrides the default interpolation start and end delimiters ({{ and }}).
property rawImports
rawImports?: outputAst.Expression;
The imports expression as appears on the component decorate for standalone component. This field is currently needed only for local compilation, and so in other compilation modes it may not be set. If component has empty array imports then this field is not set.
property relativeContextFilePath
relativeContextFilePath: string;
Path to the .ts file in which this template's generated code will be included, relative to the compilation root. This will be used to generate identifiers that need to be globally unique in certain contexts (such as g3).
property relativeTemplatePath
relativeTemplatePath: string | null;
Relative path to the component's template from the root of the project. Used to generate debugging information.
property styles
styles: string[];
A collection of styling data that will be applied and scoped to the component.
property template
template: { /** * Parsed nodes of the template. */ nodes: t.Node[]; /** * Any ng-content selectors extracted from the template. Contains `*` when an ng-content * element without selector is present. */ ngContentSelectors: string[]; /** * Whether the template preserves whitespaces from the user's code. */ preserveWhitespaces?: boolean;};
Information about the component's template.
property viewProviders
viewProviders: outputAst.Expression | null;
The list of view providers defined in the component.
interface R3DeclareClassMetadata
interface R3DeclareClassMetadata extends R3PartialDeclaration {}
Describes the shape of the object that the
ɵɵngDeclareClassMetadata()
function accepts.This interface serves primarily as documentation, as conformance to this interface is not enforced during linking.
property ctorParameters
ctorParameters?: outputAst.Expression;
Optionally specifies the constructor parameters, their types and the Angular decorators of each parameter. This property is omitted if the class does not have a constructor.
property decorators
decorators: outputAst.Expression;
The Angular decorators of the class.
property propDecorators
propDecorators?: outputAst.Expression;
Optionally specifies the Angular decorators applied to the class properties. This property is omitted if no properties have any decorators.
interface R3DeclareClassMetadataAsync
interface R3DeclareClassMetadataAsync extends R3PartialDeclaration {}
Describes the shape of the object that the
ɵɵngDeclareClassMetadataAsync()
function accepts.This interface serves primarily as documentation, as conformance to this interface is not enforced during linking.
property resolveDeferredDeps
resolveDeferredDeps: outputAst.Expression;
Function that loads the deferred dependencies associated with the component.
property resolveMetadata
resolveMetadata: outputAst.Expression;
Function that, when invoked with the resolved deferred dependencies, will return the class metadata.
interface R3DeclareComponentMetadata
interface R3DeclareComponentMetadata extends R3DeclareDirectiveMetadata {}
Describes the shape of the object that the
ɵɵngDeclareComponent()
function accepts.
property animations
animations?: outputAst.Expression;
A collection of animation triggers that will be used in the component template.
property changeDetection
changeDetection?: ChangeDetectionStrategy;
Strategy used for detecting changes in the component. Defaults to
ChangeDetectionStrategy.Default
.
property components
components?: R3DeclareDirectiveDependencyMetadata[];
List of components which matched in the template, including sufficient metadata for each directive to attribute bindings and references within the template to each directive specifically, if the runtime instructions support this.
property deferBlockDependencies
deferBlockDependencies?: outputAst.Expression[];
List of defer block dependency functions, ordered by the appearance of the corresponding deferred block in the template.
property dependencies
dependencies?: R3DeclareTemplateDependencyMetadata[];
List of dependencies which matched in the template, including sufficient metadata for each directive/pipe to attribute bindings and references within the template to each directive specifically, if the runtime instructions support this.
property directives
directives?: R3DeclareDirectiveDependencyMetadata[];
List of directives which matched in the template, including sufficient metadata for each directive to attribute bindings and references within the template to each directive specifically, if the runtime instructions support this.
property encapsulation
encapsulation?: ViewEncapsulation;
An encapsulation policy for the component's styling. Defaults to
ViewEncapsulation.Emulated
.
property interpolation
interpolation?: [string, string];
Overrides the default interpolation start and end delimiters. Defaults to {{ and }}.
property isInline
isInline?: boolean;
Whether the template was inline (using
template
) or external (usingtemplateUrl
). Defaults to false.
property pipes
pipes?: { [pipeName: string]: outputAst.Expression | (() => outputAst.Expression);};
A map of pipe names to an expression referencing the pipe type (possibly a forward reference wrapped in a
forwardRef
invocation) which are used in the template.
property preserveWhitespaces
preserveWhitespaces?: boolean;
Whether whitespace in the template should be preserved. Defaults to false.
property styles
styles?: string[];
CSS from inline styles and included styleUrls.
property template
template: outputAst.Expression;
The component's unparsed template string as opaque expression. The template is represented using either a string literal or template literal without substitutions, but its value is not read directly. Instead, the template parser is given the full source file's text and the range of this expression to parse directly from source.
property viewProviders
viewProviders?: outputAst.Expression;
The list of view providers defined in the component.
interface R3DeclareDependencyMetadata
interface R3DeclareDependencyMetadata {}
Metadata indicating how a dependency should be injected into a factory.
property attribute
attribute?: boolean;
Whether the dependency is injecting an attribute value. Default: false.
property host
host?: boolean;
Whether the dependency has an qualifier. Default: false,
property optional
optional?: boolean;
Whether the dependency has an qualifier. Default: false,
property self
self?: boolean;
Whether the dependency has an qualifier. Default: false,
property skipSelf
skipSelf?: boolean;
Whether the dependency has an qualifier. Default: false,
property token
token: outputAst.Expression | null;
An expression representing the token or value to be injected, or
null
if the dependency is not valid.If this dependency is due to the
@Attribute()
decorator, then this is an expression evaluating to the name of the attribute.
interface R3DeclareDirectiveDependencyMetadata
interface R3DeclareDirectiveDependencyMetadata {}
property exportAs
exportAs?: string[];
Names by which this directive exports itself for references.
property inputs
inputs?: string[];
Property names of the directive's inputs.
property kind
kind: 'directive' | 'component';
property outputs
outputs?: string[];
Event names of the directive's outputs.
property selector
selector: string;
Selector of the directive.
property type
type: outputAst.Expression | (() => outputAst.Expression);
Reference to the directive class (possibly a forward reference wrapped in a
forwardRef
invocation).
interface R3DeclareDirectiveMetadata
interface R3DeclareDirectiveMetadata extends R3PartialDeclaration {}
Describes the shape of the object that the
ɵɵngDeclareDirective()
function accepts.
property exportAs
exportAs?: string[];
The names by which the directive is exported.
property host
host?: { /** * A mapping of attribute names to their value expression. */ attributes?: { [key: string]: outputAst.Expression; }; /** * A mapping of event names to their unparsed event handler expression. */ listeners: { [key: string]: string; }; /** * A mapping of bound properties to their unparsed binding expression. */ properties?: { [key: string]: string; }; /** * The value of the class attribute, if present. This is stored outside of `attributes` as its * string value must be known statically. */ classAttribute?: string; /** * The value of the style attribute, if present. This is stored outside of `attributes` as its * string value must be known statically. */ styleAttribute?: string;};
Information about host bindings present on the component.
property hostDirectives
hostDirectives?: R3DeclareHostDirectiveMetadata[];
Additional directives applied to the directive host.
property inputs
inputs?: { [fieldName: string]: | { classPropertyName: string; publicName: string; isSignal: boolean; isRequired: boolean; transformFunction: outputAst.Expression | null; } | LegacyInputPartialMapping;};
A mapping of inputs from class property names to binding property names, or to a tuple of binding property name and class property name if the names are different.
property isSignal
isSignal?: boolean;
Whether the directive is a signal-based directive. Defaults to false.
property isStandalone
isStandalone?: boolean;
Whether the directive is standalone. Defaults to false.
property outputs
outputs?: { [classPropertyName: string]: string;};
A mapping of outputs from class property names to binding property names.
property providers
providers?: outputAst.Expression;
The list of providers provided by the directive.
property queries
queries?: R3DeclareQueryMetadata[];
Information about the content queries made by the directive.
property selector
selector?: string;
Unparsed selector of the directive.
property usesInheritance
usesInheritance?: boolean;
Whether the directive has an inheritance clause. Defaults to false.
property usesOnChanges
usesOnChanges?: boolean;
Whether the directive implements the
ngOnChanges
hook. Defaults to false.
property viewQueries
viewQueries?: R3DeclareQueryMetadata[];
Information about the view queries made by the directive.
interface R3DeclareFactoryMetadata
interface R3DeclareFactoryMetadata extends R3PartialDeclaration {}
Describes the shape of the object that the
ɵɵngDeclareFactory()
function accepts.This interface serves primarily as documentation, as conformance to this interface is not enforced during linking.
property deps
deps: R3DeclareDependencyMetadata[] | 'invalid' | null;
A collection of dependencies that this factory relies upon.
If this is
null
, then the type's constructor is nonexistent and will be inherited from an ancestor of the type.If this is
'invalid'
, then one or more of the parameters wasn't resolvable and any attempt to use these deps will result in a runtime error.
property target
target: FactoryTarget_2;
Type of the target being created by the factory.
interface R3DeclareHostDirectiveMetadata
interface R3DeclareHostDirectiveMetadata {}
Describes the shape of the object literal that can be passed in as a part of the
hostDirectives
array.
interface R3DeclareInjectableMetadata
interface R3DeclareInjectableMetadata extends R3PartialDeclaration {}
Describes the shape of the object that the
ɵɵngDeclareInjectable()
function accepts.This interface serves primarily as documentation, as conformance to this interface is not enforced during linking.
property deps
deps?: R3DeclareDependencyMetadata[];
An array of dependencies to support instantiating this injectable via
useClass
oruseFactory
.
property providedIn
providedIn?: outputAst.Expression;
If provided, specifies that the declared injectable belongs to a particular injector: -
InjectorType
such asNgModule
, -'root'
the root injector -'any'
all injectors. If not provided, then it does not belong to any injector. Must be explicitly listed in the providers of an injector.
property useClass
useClass?: outputAst.Expression;
If provided, an expression that evaluates to a class to use when creating an instance of this injectable.
property useExisting
useExisting?: outputAst.Expression;
If provided, an expression that evaluates to a token of another injectable that this injectable aliases.
property useFactory
useFactory?: outputAst.Expression;
If provided, an expression that evaluates to a function to use when creating an instance of this injectable.
property useValue
useValue?: outputAst.Expression;
If provided, an expression that evaluates to the value of the instance of this injectable.
interface R3DeclareInjectorMetadata
interface R3DeclareInjectorMetadata extends R3PartialDeclaration {}
Describes the shape of the objects that the
ɵɵngDeclareInjector()
accepts.
interface R3DeclareNgModuleDependencyMetadata
interface R3DeclareNgModuleDependencyMetadata {}
interface R3DeclareNgModuleMetadata
interface R3DeclareNgModuleMetadata extends R3PartialDeclaration {}
Describes the shape of the objects that the
ɵɵngDeclareNgModule()
accepts.
property bootstrap
bootstrap?: outputAst.Expression[];
An array of expressions representing the bootstrap components specified by the module.
property declarations
declarations?: outputAst.Expression[];
An array of expressions representing the directives and pipes declared by the module.
property exports
exports?: outputAst.Expression[];
An array of expressions representing the exports of the module.
property id
id?: outputAst.Expression;
Unique ID or expression representing the unique ID of an NgModule.
property imports
imports?: outputAst.Expression[];
An array of expressions representing the imports of the module.
property schemas
schemas?: outputAst.Expression[];
The set of schemas that declare elements to be allowed in the NgModule.
interface R3DeclarePipeDependencyMetadata
interface R3DeclarePipeDependencyMetadata {}
interface R3DeclarePipeMetadata
interface R3DeclarePipeMetadata extends R3PartialDeclaration {}
Describes the shape of the object that the
ɵɵngDeclarePipe()
function accepts.This interface serves primarily as documentation, as conformance to this interface is not enforced during linking.
property isStandalone
isStandalone?: boolean;
Whether the pipe is standalone.
Default: false.
property name
name: string;
The name to use in templates to refer to this pipe.
property pure
pure?: boolean;
Whether this pipe is "pure".
A pure pipe's
transform()
method is only invoked when its input arguments change.Default: true.
interface R3DeclareQueryMetadata
interface R3DeclareQueryMetadata {}
property descendants
descendants?: boolean;
Whether to include only direct children or all descendants. Defaults to false.
property emitDistinctChangesOnly
emitDistinctChangesOnly?: boolean;
True to only fire changes if there are underlying changes to the query.
property first
first?: boolean;
Whether to read only the first matching result, or an array of results. Defaults to false.
property isSignal
isSignal: boolean;
Whether the query is signal-based.
property predicate
predicate: outputAst.Expression | string[];
Either an expression representing a type (possibly wrapped in a
forwardRef()
) orInjectionToken
for the query predicate, or a set of string selectors.
property propertyName
propertyName: string;
Name of the property on the class to update with query results.
property read
read?: outputAst.Expression;
An expression representing a type to read from each matched node, or null if the default value for a given node is to be returned.
property static
static?: boolean;
Whether or not this query should collect only static results. Defaults to false.
If static is true, the query's results will be set on the component after nodes are created, but before change detection runs. This means that any results that relied upon change detection to run (e.g. results inside *ngIf or *ngFor views) will not be collected. Query results are available in the ngOnInit hook.
If static is false, the query's results will be set on the component after change detection runs. This means that the query results can contain nodes inside *ngIf or *ngFor views, but the results will not be available in the ngOnInit hook (only in the ngAfterContentInit for content hooks and ngAfterViewInit for view hooks).
interface R3DeferPerBlockDependency
interface R3DeferPerBlockDependency {}
Information about a single dependency of a defer block in
PerBlock
mode.
property importPath
importPath: string | null;
Import path where this dependency is located.
property isDefaultImport
isDefaultImport: boolean;
Whether the symbol is the default export.
property isDeferrable
isDeferrable: boolean;
Whether this dependency can be defer-loaded.
property symbolName
symbolName: string;
Dependency class name.
property typeReference
typeReference: outputAst.Expression;
Reference to a dependency.
interface R3DeferPerComponentDependency
interface R3DeferPerComponentDependency {}
Information about a single dependency of a defer block in
PerComponent
mode.
property importPath
importPath: string;
Import path where this dependency is located.
property isDefaultImport
isDefaultImport: boolean;
Whether the symbol is the default export.
property symbolName
symbolName: string;
Dependency class name.
interface R3DependencyMetadata
interface R3DependencyMetadata {}
property attributeNameType
attributeNameType: outputAst.Expression | null;
If an decorator is present, this is the literal type of the attribute name, or the unknown type if no literal type is available (e.g. the attribute name is an expression). Otherwise it is null;
property host
host: boolean;
Whether the dependency has an qualifier.
property optional
optional: boolean;
Whether the dependency has an qualifier.
property self
self: boolean;
Whether the dependency has an qualifier.
property skipSelf
skipSelf: boolean;
Whether the dependency has an qualifier.
property token
token: outputAst.Expression | null;
An expression representing the token or value to be injected. Or
null
if the dependency could not be resolved - making it invalid.
interface R3DirectiveDependencyMetadata
interface R3DirectiveDependencyMetadata extends R3TemplateDependency {}
Information about a directive that is used in a component template. Only the stable, public facing information of the directive is stored here.
property exportAs
exportAs: string[] | null;
Name under which the directive is exported, if any (exportAs in Angular). Null otherwise.
property inputs
inputs: string[];
The binding property names of the inputs of the directive.
property isComponent
isComponent: boolean;
If true then this directive is actually a component; otherwise it is not.
property kind
kind: R3TemplateDependencyKind.Directive;
property outputs
outputs: string[];
The binding property names of the outputs of the directive.
property selector
selector: string;
The selector of the directive.
interface R3DirectiveMetadata
interface R3DirectiveMetadata {}
Information needed to compile a directive for the render3 runtime.
property deps
deps: R3DependencyMetadata[] | 'invalid' | null;
Dependencies of the directive's constructor.
property exportAs
exportAs: string[] | null;
Reference name under which to export the directive's type in a template, if any.
property fullInheritance
fullInheritance: boolean;
Whether or not the component or directive inherits its entire decorator from its base class.
property host
host: R3HostMetadata;
Mappings indicating how the directive interacts with its host element (host bindings, listeners, etc).
property hostDirectives
hostDirectives: R3HostDirectiveMetadata[] | null;
Additional directives applied to the directive host.
property inputs
inputs: { [field: string]: R3InputMetadata;};
A mapping of inputs from class property names to binding property names, or to a tuple of binding property name and class property name if the names are different.
property isSignal
isSignal: boolean;
Whether or not the component or directive is signal-based.
property isStandalone
isStandalone: boolean;
Whether or not the component or directive is standalone.
property lifecycle
lifecycle: { /** * Whether the directive uses NgOnChanges. */ usesOnChanges: boolean;};
Information about usage of specific lifecycle events which require special treatment in the code generator.
property name
name: string;
Name of the directive type.
property outputs
outputs: { [field: string]: string;};
A mapping of outputs from class property names to binding property names, or to a tuple of binding property name and class property name if the names are different.
property providers
providers: outputAst.Expression | null;
The list of providers defined in the directive.
property queries
queries: R3QueryMetadata[];
Information about the content queries made by the directive.
property selector
selector: string | null;
Unparsed selector of the directive, or
null
if there was no selector.
property type
type: R3Reference;
An expression representing a reference to the directive itself.
property typeArgumentCount
typeArgumentCount: number;
Number of generic type parameters of the type itself.
property typeSourceSpan
typeSourceSpan: ParseSourceSpan;
A source span for the directive type.
property usesInheritance
usesInheritance: boolean;
Whether or not the component or directive inherits from another class
property viewQueries
viewQueries: R3QueryMetadata[];
Information about the view queries made by the directive.
interface R3HmrMetadata
interface R3HmrMetadata {}
Metadata necessary to compile HMR-related code call.
property className
className: string;
Name of the component class.
property filePath
filePath: string;
File path of the component class.
property localDependencies
localDependencies: string[];
HMR update functions cannot contain imports so any locals the generated code depends on (e.g. references to imports within the same file or imported symbols) have to be passed in as function parameters. This array contains the names of those local symbols.
property namespaceDependencies
namespaceDependencies: R3HmrNamespaceDependency[];
When the compiler generates new imports, they get produced as namespace imports (e.g. import * as i0 from '@angular/core'). These namespaces have to be captured and passed along to the update callback.
property type
type: outputAst.Expression;
Component class for which HMR is being enabled.
interface R3HmrNamespaceDependency
interface R3HmrNamespaceDependency {}
HMR dependency on a namespace import.
property assignedName
assignedName: string;
Name under which to refer to the namespace inside HMR-related code. Must be a valid JS identifier.
property moduleName
moduleName: string;
Module name of the import.
interface R3HostDirectiveMetadata
interface R3HostDirectiveMetadata {}
Information needed to compile a host directive for the render3 runtime.
property directive
directive: R3Reference;
An expression representing the host directive class itself.
property inputs
inputs: { [publicName: string]: string;} | null;
Inputs from the host directive that will be exposed on the host.
property isForwardReference
isForwardReference: boolean;
Whether the expression referring to the host directive is a forward reference.
property outputs
outputs: { [publicName: string]: string;} | null;
Outputs from the host directive that will be exposed on the host.
interface R3HostMetadata
interface R3HostMetadata {}
Mappings indicating how the class interacts with its host element (host bindings, listeners, etc).
property attributes
attributes: { [key: string]: outputAst.Expression;};
A mapping of attribute binding keys to
o.Expression
s.
property listeners
listeners: { [key: string]: string;};
A mapping of event binding keys to unparsed expressions.
property properties
properties: { [key: string]: string;};
A mapping of property binding keys to unparsed expressions.
property specialAttributes
specialAttributes: { styleAttr?: string; classAttr?: string;};
interface R3InjectableMetadata
interface R3InjectableMetadata {}
property deps
deps?: R3DependencyMetadata[];
property name
name: string;
property providedIn
providedIn: MaybeForwardRefExpression;
property type
type: R3Reference;
property typeArgumentCount
typeArgumentCount: number;
property useClass
useClass?: MaybeForwardRefExpression;
property useExisting
useExisting?: MaybeForwardRefExpression;
property useFactory
useFactory?: outputAst.Expression;
property useValue
useValue?: MaybeForwardRefExpression;
interface R3InjectorMetadata
interface R3InjectorMetadata {}
interface R3InputMetadata
interface R3InputMetadata {}
Metadata for an individual input on a directive.
property bindingPropertyName
bindingPropertyName: string;
property classPropertyName
classPropertyName: string;
property isSignal
isSignal: boolean;
property required
required: boolean;
property transformFunction
transformFunction: outputAst.Expression | null;
Transform function for the input.
Null if there is no transform, or if this is a signal input. Signal inputs capture their transform as part of the
InputSignal
.
interface R3NgModuleDependencyMetadata
interface R3NgModuleDependencyMetadata extends R3TemplateDependency {}
property kind
kind: R3TemplateDependencyKind.NgModule;
interface R3NgModuleMetadataGlobal
interface R3NgModuleMetadataGlobal extends R3NgModuleMetadataCommon {}
Metadata required by the module compiler in full/partial mode to generate a module def (
ɵmod
) for a type.
property bootstrap
bootstrap: R3Reference[];
An array of expressions representing the bootstrap components specified by the module.
property containsForwardDecls
containsForwardDecls: boolean;
Whether to generate closure wrappers for bootstrap, declarations, imports, and exports.
property declarations
declarations: R3Reference[];
An array of expressions representing the directives and pipes declared by the module.
property exports
exports: R3Reference[];
An array of expressions representing the exports of the module.
property imports
imports: R3Reference[];
An array of expressions representing the imports of the module.
property includeImportTypes
includeImportTypes: boolean;
Whether or not to include
imports
in generated type declarations.
property kind
kind: R3NgModuleMetadataKind.Global;
property publicDeclarationTypes
publicDeclarationTypes: outputAst.Expression[] | null;
Those declarations which should be visible to downstream consumers. If not specified, all declarations are made visible to downstream consumers.
interface R3PartialDeclaration
interface R3PartialDeclaration {}
property minVersion
minVersion: string;
The minimum version of the compiler that can process this partial declaration.
property ngImport
ngImport: outputAst.Expression;
A reference to the
@angular/core
ES module, which allows access to all Angular exports, including Ivy instructions.
property type
type: outputAst.Expression;
Reference to the decorated class, which is subject to this partial declaration.
property version
version: string;
Version number of the Angular compiler that was used to compile this declaration. The linker will be able to detect which version a library is using and interpret its metadata accordingly.
interface R3PipeDependencyMetadata
interface R3PipeDependencyMetadata extends R3TemplateDependency {}
interface R3PipeMetadata
interface R3PipeMetadata {}
property deps
deps: R3DependencyMetadata[] | null;
Dependencies of the pipe's constructor.
property isStandalone
isStandalone: boolean;
Whether the pipe is standalone.
property name
name: string;
Name of the pipe type.
property pipeName
pipeName: string;
Name of the pipe.
property pure
pure: boolean;
Whether the pipe is marked as pure.
property type
type: R3Reference;
An expression representing a reference to the pipe itself.
property typeArgumentCount
typeArgumentCount: number;
Number of generic type parameters of the type itself.
interface R3QueryMetadata
interface R3QueryMetadata {}
Information needed to compile a query (view or content).
property descendants
descendants: boolean;
Whether to include only direct children or all descendants.
property emitDistinctChangesOnly
emitDistinctChangesOnly: boolean;
If the
QueryList
should fire change event only if actual change to query was computed (vs old behavior where the change was fired whenever the query was recomputed, even if the recomputed query resulted in the same list.)
property first
first: boolean;
Whether to read only the first matching result, or an array of results.
property isSignal
isSignal: boolean;
Whether the query is signal-based.
property predicate
predicate: MaybeForwardRefExpression | string[];
Either an expression representing a type or
InjectionToken
for the query predicate, or a set of string selectors.Note: At compile time we split selectors as an optimization that avoids this extra work at runtime creation phase.
Notably, if the selector is not statically analyzable due to an expression, the selectors may need to be split up at runtime.
property propertyName
propertyName: string;
Name of the property on the class to update with query results.
property read
read: outputAst.Expression | null;
An expression representing a type to read from each matched node, or null if the default value for a given node is to be returned.
property static
static: boolean;
Whether or not this query should collect only static results.
If static is true, the query's results will be set on the component after nodes are created, but before change detection runs. This means that any results that relied upon change detection to run (e.g. results inside *ngIf or *ngFor views) will not be collected. Query results are available in the ngOnInit hook.
If static is false, the query's results will be set on the component after change detection runs. This means that the query results can contain nodes inside *ngIf or *ngFor views, but the results will not be available in the ngOnInit hook (only in the ngAfterContentInit for content hooks and ngAfterViewInit for view hooks).
Note: For signal-based queries, this option does not have any effect.
interface R3Reference
interface R3Reference {}
interface R3TemplateDependency
interface R3TemplateDependency {}
A dependency that's used within a component template.
interface SchemaMetadata
interface SchemaMetadata {}
property name
name: string;
interface StatementVisitor
interface StatementVisitor {}
method visitDeclareFunctionStmt
visitDeclareFunctionStmt: (stmt: DeclareFunctionStmt, context: any) => any;
method visitDeclareVarStmt
visitDeclareVarStmt: (stmt: DeclareVarStmt, context: any) => any;
method visitExpressionStmt
visitExpressionStmt: (stmt: ExpressionStatement, context: any) => any;
method visitIfStmt
visitIfStmt: (stmt: IfStmt, context: any) => any;
method visitReturnStmt
visitReturnStmt: (stmt: ReturnStatement, context: any) => any;
interface TagDefinition
interface TagDefinition {}
property canSelfClose
canSelfClose: boolean;
property closedByParent
closedByParent: boolean;
property ignoreFirstLf
ignoreFirstLf: boolean;
property implicitNamespacePrefix
implicitNamespacePrefix: string | null;
property isVoid
isVoid: boolean;
property preventNamespaceInheritance
preventNamespaceInheritance: boolean;
method getContentType
getContentType: (prefix?: string) => TagContentType;
method isClosedByChild
isClosedByChild: (name: string) => boolean;
interface Target
interface Target {}
A logical target for analysis, which could contain a template or other types of bindings.
property template
template?: TmplAstNode[];
interface TargetBinder
interface TargetBinder<D extends DirectiveMeta> {}
Interface to the binding API, which processes a template and returns an object similar to the
ts.TypeChecker
.The returned
BoundTarget
has an API for extracting information about the processed target.
method bind
bind: (target: Target) => BoundTarget<D>;
interface TemplateBindingIdentifier
interface TemplateBindingIdentifier {}
interface TmplAstDeferredBlockTriggers
interface TmplAstDeferredBlockTriggers {}
property hover
hover?: TmplAstHoverDeferredTrigger;
property idle
idle?: TmplAstIdleDeferredTrigger;
property immediate
immediate?: TmplAstImmediateDeferredTrigger;
property interaction
interaction?: TmplAstInteractionDeferredTrigger;
property never
never?: TmplAstNeverDeferredTrigger;
property timer
timer?: TmplAstTimerDeferredTrigger;
property viewport
viewport?: TmplAstViewportDeferredTrigger;
property when
when?: TmplAstBoundDeferredTrigger;
interface TmplAstNode
interface TmplAstNode {}
property sourceSpan
sourceSpan: ParseSourceSpan;
method visit
visit: <Result>(visitor: TmplAstVisitor<Result>) => Result;
interface TmplAstVisitor
interface TmplAstVisitor<Result = any> {}
method visit
visit: (node: TmplAstNode) => Result;
method visitBoundAttribute
visitBoundAttribute: (attribute: TmplAstBoundAttribute) => Result;
method visitBoundEvent
visitBoundEvent: (attribute: TmplAstBoundEvent) => Result;
method visitBoundText
visitBoundText: (text: TmplAstBoundText) => Result;
method visitContent
visitContent: (content: TmplAstContent) => Result;
method visitDeferredBlock
visitDeferredBlock: (deferred: TmplAstDeferredBlock) => Result;
method visitDeferredBlockError
visitDeferredBlockError: (block: TmplAstDeferredBlockError) => Result;
method visitDeferredBlockLoading
visitDeferredBlockLoading: (block: TmplAstDeferredBlockLoading) => Result;
method visitDeferredBlockPlaceholder
visitDeferredBlockPlaceholder: ( block: TmplAstDeferredBlockPlaceholder) => Result;
method visitDeferredTrigger
visitDeferredTrigger: (trigger: TmplAstDeferredTrigger) => Result;
method visitElement
visitElement: (element: TmplAstElement) => Result;
method visitForLoopBlock
visitForLoopBlock: (block: TmplAstForLoopBlock) => Result;
method visitForLoopBlockEmpty
visitForLoopBlockEmpty: (block: TmplAstForLoopBlockEmpty) => Result;
method visitIcu
visitIcu: (icu: TmplAstIcu) => Result;
method visitIfBlock
visitIfBlock: (block: TmplAstIfBlock) => Result;
method visitIfBlockBranch
visitIfBlockBranch: (block: TmplAstIfBlockBranch) => Result;
method visitLetDeclaration
visitLetDeclaration: (decl: TmplAstLetDeclaration) => Result;
method visitReference
visitReference: (reference: TmplAstReference) => Result;
method visitSwitchBlock
visitSwitchBlock: (block: TmplAstSwitchBlock) => Result;
method visitSwitchBlockCase
visitSwitchBlockCase: (block: TmplAstSwitchBlockCase) => Result;
method visitTemplate
visitTemplate: (template: TmplAstTemplate) => Result;
method visitText
visitText: (text: TmplAstText) => Result;
method visitTextAttribute
visitTextAttribute: (attribute: TmplAstTextAttribute) => Result;
method visitUnknownBlock
visitUnknownBlock: (block: TmplAstUnknownBlock) => Result;
method visitVariable
visitVariable: (variable: TmplAstVariable) => Result;
interface TypeVisitor
interface TypeVisitor {}
method visitArrayType
visitArrayType: (type: ArrayType, context: any) => any;
method visitBuiltinType
visitBuiltinType: (type: BuiltinType, context: any) => any;
method visitExpressionType
visitExpressionType: (type: ExpressionType, context: any) => any;
method visitMapType
visitMapType: (type: MapType, context: any) => any;
method visitTransplantedType
visitTransplantedType: (type: TransplantedType<unknown>, context: any) => any;
interface Visitor
interface Visitor {}
method visit
visit: (node: Node_2, context: any) => any;
method visitAttribute
visitAttribute: (attribute: Attribute, context: any) => any;
method visitBlock
visitBlock: (block: Block, context: any) => any;
method visitBlockParameter
visitBlockParameter: (parameter: BlockParameter, context: any) => any;
method visitComment
visitComment: (comment: Comment_2, context: any) => any;
method visitElement
visitElement: (element: Element_2, context: any) => any;
method visitExpansion
visitExpansion: (expansion: Expansion, context: any) => any;
method visitExpansionCase
visitExpansionCase: (expansionCase: ExpansionCase, context: any) => any;
method visitLetDeclaration
visitLetDeclaration: (decl: LetDeclaration, context: any) => any;
method visitText
visitText: (text: Text_2, context: any) => any;
Enums
enum BinaryOperator
enum BinaryOperator { Equals = 0, NotEquals = 1, Identical = 2, NotIdentical = 3, Minus = 4, Plus = 5, Divide = 6, Multiply = 7, Modulo = 8, And = 9, Or = 10, BitwiseOr = 11, BitwiseAnd = 12, Lower = 13, LowerEquals = 14, Bigger = 15, BiggerEquals = 16, NullishCoalesce = 17,}
member And
And = 9
member Bigger
Bigger = 15
member BiggerEquals
BiggerEquals = 16
member BitwiseAnd
BitwiseAnd = 12
member BitwiseOr
BitwiseOr = 11
member Divide
Divide = 6
member Equals
Equals = 0
member Identical
Identical = 2
member Lower
Lower = 13
member LowerEquals
LowerEquals = 14
member Minus
Minus = 4
member Modulo
Modulo = 8
member Multiply
Multiply = 7
member NotEquals
NotEquals = 1
member NotIdentical
NotIdentical = 3
member NullishCoalesce
NullishCoalesce = 17
member Or
Or = 10
member Plus
Plus = 5
enum BindingType
enum BindingType { Property = 0, Attribute = 1, Class = 2, Style = 3, Animation = 4, TwoWay = 5,}
enum BuiltinTypeName
enum BuiltinTypeName { Dynamic = 0, Bool = 1, String = 2, Int = 3, Number = 4, Function = 5, Inferred = 6, None = 7,}
enum ChangeDetectionStrategy
enum ChangeDetectionStrategy { OnPush = 0, Default = 1,}
enum DeclarationListEmitMode
const enum DeclarationListEmitMode { Direct = 0, Closure = 1, ClosureResolved = 2, RuntimeResolved = 3,}
Specifies how a list of declaration type references should be emitted into the generated code.
member Closure
Closure = 1
The list of declarations is emitted into the generated code wrapped inside a closure, which is needed when at least one declaration is a forward reference.
directives: function () { return [MyDir, ForwardDir]; },
member ClosureResolved
ClosureResolved = 2
Similar to
Closure
, with the addition that the list of declarations can contain individual items that are themselves forward references. This is relevant for JIT compilations, as unwrapping the forwardRef cannot be done statically so must be deferred. This mode emits the declaration list using a mapping transform throughresolveForwardRef
to ensure that any forward references within the list are resolved when the outer closure is invoked.Consider the case where the runtime has captured two declarations in two distinct values:
const dirA = MyDir;const dirB = forwardRef(function() { return ForwardRef; });This mode would emit the declarations captured in
dirA
anddirB
as follows:directives: function () { return [dirA, dirB].map(ng.resolveForwardRef); },
member Direct
Direct = 0
The list of declarations is emitted into the generated code as is.
directives: [MyDir],
member RuntimeResolved
RuntimeResolved = 3
enum DeferBlockDepsEmitMode
const enum DeferBlockDepsEmitMode { PerBlock = 0, PerComponent = 1,}
Defines how dynamic imports for deferred dependencies should be emitted in the generated output: - either in a function on per-component basis (in case of local compilation) - or in a function on per-block basis (in full compilation mode)
member PerBlock
PerBlock = 0
Dynamic imports are grouped on per-block basis.
This is used in full compilation mode, when compiler has more information about particular dependencies that belong to this block.
member PerComponent
PerComponent = 1
Dynamic imports are grouped on per-component basis.
In local compilation, compiler doesn't have enough information to determine which deferred dependencies belong to which block. In this case we group all dynamic imports into a single file on per-component basis.
enum FactoryTarget
enum FactoryTarget { Directive = 0, Component = 1, Injectable = 2, Pipe = 3, NgModule = 4,}
member Component
Component = 1
member Directive
Directive = 0
member Injectable
Injectable = 2
member NgModule
NgModule = 4
member Pipe
Pipe = 3
enum ForwardRefHandling
const enum ForwardRefHandling { None = 0, Wrapped = 1, Unwrapped = 2,}
Specifies how a forward ref has been handled in a MaybeForwardRefExpression
enum LexerTokenType
const enum LexerTokenType { TAG_OPEN_START = 0, TAG_OPEN_END = 1, TAG_OPEN_END_VOID = 2, TAG_CLOSE = 3, INCOMPLETE_TAG_OPEN = 4, TEXT = 5, ESCAPABLE_RAW_TEXT = 6, RAW_TEXT = 7, INTERPOLATION = 8, ENCODED_ENTITY = 9, COMMENT_START = 10, COMMENT_END = 11, CDATA_START = 12, CDATA_END = 13, ATTR_NAME = 14, ATTR_QUOTE = 15, ATTR_VALUE_TEXT = 16, ATTR_VALUE_INTERPOLATION = 17, DOC_TYPE = 18, EXPANSION_FORM_START = 19, EXPANSION_CASE_VALUE = 20, EXPANSION_CASE_EXP_START = 21, EXPANSION_CASE_EXP_END = 22, EXPANSION_FORM_END = 23, BLOCK_OPEN_START = 24, BLOCK_OPEN_END = 25, BLOCK_CLOSE = 26, BLOCK_PARAMETER = 27, INCOMPLETE_BLOCK_OPEN = 28, LET_START = 29, LET_VALUE = 30, LET_END = 31, INCOMPLETE_LET = 32, EOF = 33,}
member ATTR_NAME
ATTR_NAME = 14
member ATTR_QUOTE
ATTR_QUOTE = 15
member ATTR_VALUE_INTERPOLATION
ATTR_VALUE_INTERPOLATION = 17
member ATTR_VALUE_TEXT
ATTR_VALUE_TEXT = 16
member BLOCK_CLOSE
BLOCK_CLOSE = 26
member BLOCK_OPEN_END
BLOCK_OPEN_END = 25
member BLOCK_OPEN_START
BLOCK_OPEN_START = 24
member BLOCK_PARAMETER
BLOCK_PARAMETER = 27
member CDATA_END
CDATA_END = 13
member CDATA_START
CDATA_START = 12
member COMMENT_END
COMMENT_END = 11
member COMMENT_START
COMMENT_START = 10
member DOC_TYPE
DOC_TYPE = 18
member ENCODED_ENTITY
ENCODED_ENTITY = 9
member EOF
EOF = 33
member ESCAPABLE_RAW_TEXT
ESCAPABLE_RAW_TEXT = 6
member EXPANSION_CASE_EXP_END
EXPANSION_CASE_EXP_END = 22
member EXPANSION_CASE_EXP_START
EXPANSION_CASE_EXP_START = 21
member EXPANSION_CASE_VALUE
EXPANSION_CASE_VALUE = 20
member EXPANSION_FORM_END
EXPANSION_FORM_END = 23
member EXPANSION_FORM_START
EXPANSION_FORM_START = 19
member INCOMPLETE_BLOCK_OPEN
INCOMPLETE_BLOCK_OPEN = 28
member INCOMPLETE_LET
INCOMPLETE_LET = 32
member INCOMPLETE_TAG_OPEN
INCOMPLETE_TAG_OPEN = 4
member INTERPOLATION
INTERPOLATION = 8
member LET_END
LET_END = 31
member LET_START
LET_START = 29
member LET_VALUE
LET_VALUE = 30
member RAW_TEXT
RAW_TEXT = 7
member TAG_CLOSE
TAG_CLOSE = 3
member TAG_OPEN_END
TAG_OPEN_END = 1
member TAG_OPEN_END_VOID
TAG_OPEN_END_VOID = 2
member TAG_OPEN_START
TAG_OPEN_START = 0
member TEXT
TEXT = 5
enum ParsedEventType
enum ParsedEventType { Regular = 0, Animation = 1, TwoWay = 2,}
enum ParsedPropertyType
enum ParsedPropertyType { DEFAULT = 0, LITERAL_ATTR = 1, ANIMATION = 2, TWO_WAY = 3,}
member ANIMATION
ANIMATION = 2
member DEFAULT
DEFAULT = 0
member LITERAL_ATTR
LITERAL_ATTR = 1
member TWO_WAY
TWO_WAY = 3
enum ParseErrorLevel
enum ParseErrorLevel { WARNING = 0, ERROR = 1,}
enum ParseFlags
const enum ParseFlags { None = 0, Action = 1,}
Represents the possible parse modes to be used as a bitmask.
enum R3NgModuleMetadataKind
enum R3NgModuleMetadataKind { Global = 0, Local = 1,}
The type of the NgModule meta data. - Global: Used for full and partial compilation modes which mainly includes R3References. - Local: Used for the local compilation mode which mainly includes the raw expressions as appears in the NgModule decorator.
enum R3SelectorScopeMode
enum R3SelectorScopeMode { Inline = 0, SideEffect = 1, Omit = 2,}
How the selector scope of an NgModule (its declarations, imports, and exports) should be emitted as a part of the NgModule definition.
member Inline
Inline = 0
Emit the declarations inline into the module definition.
This option is useful in certain contexts where it's known that JIT support is required. The tradeoff here is that this emit style prevents directives and pipes from being tree-shaken if they are unused, but the NgModule is used.
member Omit
Omit = 2
Don't generate selector scopes at all.
This is useful for contexts where JIT support is known to be unnecessary.
member SideEffect
SideEffect = 1
Emit the declarations using a side effectful function call,
ɵɵsetNgModuleScope
, that is guarded with thengJitMode
flag.This form of emit supports JIT and can be optimized away if the
ngJitMode
flag is set to false, which allows unused directives and pipes to be tree-shaken.
enum R3TemplateDependencyKind
enum R3TemplateDependencyKind { Directive = 0, Pipe = 1, NgModule = 2,}
enum StmtModifier
enum StmtModifier { None = 0, Final = 1, Private = 2, Exported = 4, Static = 8,}
enum TagContentType
enum TagContentType { RAW_TEXT = 0, ESCAPABLE_RAW_TEXT = 1, PARSABLE_DATA = 2,}
member ESCAPABLE_RAW_TEXT
ESCAPABLE_RAW_TEXT = 1
member PARSABLE_DATA
PARSABLE_DATA = 2
member RAW_TEXT
RAW_TEXT = 0
enum TokenType
enum TokenType { Character = 0, Identifier = 1, PrivateIdentifier = 2, Keyword = 3, String = 4, Operator = 5, Number = 6, Error = 7,}
member Character
Character = 0
member Error
Error = 7
member Identifier
Identifier = 1
member Keyword
Keyword = 3
member Number
Number = 6
member Operator
Operator = 5
member PrivateIdentifier
PrivateIdentifier = 2
member String
String = 4
enum TypeModifier
enum TypeModifier { None = 0, Const = 1,}
enum UnaryOperator
enum UnaryOperator { Minus = 0, Plus = 1,}
enum ViewEncapsulation
enum ViewEncapsulation { Emulated = 0, None = 2, ShadowDom = 3,}
Type Aliases
type CompileClassMetadataFn
type CompileClassMetadataFn = (metadata: R3ClassMetadata) => outputAst.Expression;
type LegacyInputPartialMapping
type LegacyInputPartialMapping = | string | [ bindingPropertyName: string, classPropertyName: string, transformFunction?: outputAst.Expression ];
type LiteralMapKey
type LiteralMapKey = { key: string; quoted: boolean; isShorthandInitialized?: boolean;};
type Node
type Node_2 = | Attribute | Comment_2 | Element_2 | Expansion | ExpansionCase | Text_2 | Block | BlockParameter;
type R3ComponentDeferMetadata
type R3ComponentDeferMetadata = | { mode: DeferBlockDepsEmitMode.PerBlock; blocks: Map<t.DeferredBlock, outputAst.Expression | null>; } | { mode: DeferBlockDepsEmitMode.PerComponent; dependenciesFn: outputAst.Expression | null; };
Information about the deferred blocks in a component's template.
type R3DeclareTemplateDependencyMetadata
type R3DeclareTemplateDependencyMetadata = | R3DeclareDirectiveDependencyMetadata | R3DeclarePipeDependencyMetadata | R3DeclareNgModuleDependencyMetadata;
type R3DeferResolverFunctionMetadata
type R3DeferResolverFunctionMetadata = | { mode: DeferBlockDepsEmitMode.PerBlock; dependencies: R3DeferPerBlockDependency[]; } | { mode: DeferBlockDepsEmitMode.PerComponent; dependencies: R3DeferPerComponentDependency[]; };
Information needed to compile the defer block resolver function.
type R3FactoryMetadata
type R3FactoryMetadata = | R3ConstructorFactoryMetadata | R3DelegatedFnOrClassMetadata | R3ExpressionFactoryMetadata;
type R3NgModuleMetadata
type R3NgModuleMetadata = R3NgModuleMetadataGlobal | R3NgModuleMetadataLocal;
Metadata required by the module compiler to generate a module def (
ɵmod
) for a type.
type R3TemplateDependencyMetadata
type R3TemplateDependencyMetadata = | R3DirectiveDependencyMetadata | R3PipeDependencyMetadata | R3NgModuleDependencyMetadata;
A dependency that's used within a component template
type ReferenceTarget
type ReferenceTarget<DirectiveT> = | { directive: DirectiveT; node: TmplAstElement | TmplAstTemplate; } | TmplAstElement | TmplAstTemplate;
Possible values that a reference can be resolved to.
type ScopedNode
type ScopedNode = | TmplAstTemplate | TmplAstSwitchBlockCase | TmplAstIfBlockBranch | TmplAstForLoopBlock | TmplAstForLoopBlockEmpty | TmplAstDeferredBlock | TmplAstDeferredBlockError | TmplAstDeferredBlockLoading | TmplAstDeferredBlockPlaceholder | TmplAstContent;
Node that has a
Scope
associated with it.
type SourceMap
type SourceMap = { version: number; file?: string; sourceRoot: string; sources: string[]; sourcesContent: (string | null)[]; mappings: string;};
type TemplateBinding
type TemplateBinding = VariableBinding | ExpressionBinding;
TemplateBinding refers to a particular key-value pair in a microsyntax expression. A few examples are:
|---------------------|--------------|---------|--------------| | expression | key | value | binding type | |---------------------|--------------|---------|--------------| | 1. let item | item | null | variable | | 2. of items | ngForOf | items | expression | | 3. let x = y | x | y | variable | | 4. index as i | i | index | variable | | 5. trackBy: func | ngForTrackBy | func | expression | | 6. *ngIf="cond" | ngIf | cond | expression | |---------------------|--------------|---------|--------------|
(6) is a notable exception because it is a binding from the template key in the LHS of a HTML attribute to the expression in the RHS. All other bindings in the example above are derived solely from the RHS.
type TemplateEntity
type TemplateEntity = TmplAstReference | TmplAstVariable | TmplAstLetDeclaration;
Entity that is local to the template and defined within the template.
Namespaces
namespace core
namespace core {}
variable CUSTOM_ELEMENTS_SCHEMA
const CUSTOM_ELEMENTS_SCHEMA: SchemaMetadata;
variable emitDistinctChangesOnlyDefaultValue
const emitDistinctChangesOnlyDefaultValue: boolean;
variable NO_ERRORS_SCHEMA
const NO_ERRORS_SCHEMA: SchemaMetadata;
variable Type
const Type: FunctionConstructor;
function parseSelectorToR3Selector
parseSelectorToR3Selector: (selector: string | null) => R3CssSelectorList;
interface HostBinding
interface HostBinding {}
property hostPropertyName
hostPropertyName?: string;
interface HostListener
interface HostListener {}
interface Input
interface Input {}
interface SchemaMetadata
interface SchemaMetadata {}
property name
name: string;
interface Type
interface Type_2 extends Function {}
construct signature
new (...args: any[]): any;
enum AttributeMarker
const enum AttributeMarker { NamespaceURI = 0, Classes = 1, Styles = 2, Bindings = 3, Template = 4, ProjectAs = 5, I18n = 6,}
A set of marker values to be used in the attributes arrays. These markers indicate that some items are not regular attributes and the processing should be adapted accordingly.
member Bindings
Bindings = 3
Signals that the following attribute names were extracted from input or output bindings.
For example, given the following HTML:
<div moo="car" [foo]="exp" (bar)="doSth()">the generated code is:
var _c1 = ['moo', 'car', AttributeMarker.Bindings, 'foo', 'bar'];
member Classes
Classes = 1
Signals class declaration.
Each value following
Classes
designates a class name to include on the element. ## Example:Given:
<div class="foo bar baz">...</div>the generated code is:
var _c1 = [AttributeMarker.Classes, 'foo', 'bar', 'baz'];
member I18n
I18n = 6
Signals that the following attribute will be translated by runtime i18n
For example, given the following HTML:
<div moo="car" foo="value" i18n-foo [bar]="binding" i18n-bar>the generated code is:
var _c1 = ['moo', 'car', AttributeMarker.I18n, 'foo', 'bar'];
member NamespaceURI
NamespaceURI = 0
Marker indicates that the following 3 values in the attributes array are: namespaceUri, attributeName, attributeValue in that order.
member ProjectAs
ProjectAs = 5
Signals that the following attribute is
ngProjectAs
and its value is a parsedCssSelector
.For example, given the following HTML:
<h1 attr="value" ngProjectAs="[title]">the generated code for the
element()
instruction would include:['attr', 'value', AttributeMarker.ProjectAs, ['', 'title', '']]
member Styles
Styles = 2
Signals style declaration.
Each pair of values following
Styles
designates a style name and value to include on the element. ## Example:Given:
<div style="width:100px; height:200px; color:red">...</div>the generated code is:
var _c1 = [AttributeMarker.Styles, 'width', '100px', 'height'. '200px', 'color', 'red'];
member Template
Template = 4
Signals that the following attribute names were hoisted from an inline-template declaration.
For example, given the following HTML:
<div *ngFor="let value of values; trackBy:trackBy" dirA [dirB]="value">the generated code for the
template()
instruction would include:['dirA', '', AttributeMarker.Bindings, 'dirB', AttributeMarker.Template, 'ngFor', 'ngForOf','ngForTrackBy', 'let-value']while the generated code for the
element()
instruction inside the template function would include:['dirA', '', AttributeMarker.Bindings, 'dirB']
enum ChangeDetectionStrategy
enum ChangeDetectionStrategy { OnPush = 0, Default = 1,}
enum InjectFlags
const enum InjectFlags { Default = 0, Host = 1, Self = 2, SkipSelf = 4, Optional = 8,}
Injection flags for DI.
member Default
Default = 0
member Host
Host = 1
Specifies that an injector should retrieve a dependency from any injector until reaching the host element of the current component. (Only used with Element Injector)
member Optional
Optional = 8
Inject
defaultValue
instead if token not found.
member Self
Self = 2
Don't descend into ancestors of the node requesting injection.
member SkipSelf
SkipSelf = 4
Skip the node that is requesting injection.
enum InputFlags
enum InputFlags { None = 0, SignalBased = 1, HasDecoratorInputTransform = 2,}
Flags describing an input for a directive.
member HasDecoratorInputTransform
HasDecoratorInputTransform = 2
member None
None = 0
member SignalBased
SignalBased = 1
enum MissingTranslationStrategy
enum MissingTranslationStrategy { Error = 0, Warning = 1, Ignore = 2,}
enum RenderFlags
const enum RenderFlags { Create = 1, Update = 2,}
Flags passed into template functions to determine which blocks (i.e. creation, update) should be executed.
Typically, a template runs both the creation block and the update block on initialization and subsequent runs only execute the update block. However, dynamically created views require that the creation block be executed separately from the update block (for backwards compat).
enum SecurityContext
enum SecurityContext { NONE = 0, HTML = 1, STYLE = 2, SCRIPT = 3, URL = 4, RESOURCE_URL = 5,}
enum SelectorFlags
const enum SelectorFlags { NOT = 1, ATTRIBUTE = 2, ELEMENT = 4, CLASS = 8,}
Flags used to generate R3-style CSS Selectors. They are pasted from core/src/render3/projection.ts because they cannot be referenced directly.
enum ViewEncapsulation
enum ViewEncapsulation { Emulated = 0, None = 2, ShadowDom = 3,}
type R3CssSelector
type R3CssSelector = (string | SelectorFlags)[];
type R3CssSelectorList
type R3CssSelectorList = R3CssSelector[];
namespace html
namespace html {}
function visitAll
visitAll: (visitor: Visitor, nodes: Node_2[], context?: any) => any[];
class Attribute
class Attribute extends NodeWithI18n {}
constructor
constructor( name: string, value: string, sourceSpan: ParseSourceSpan, keySpan: ParseSourceSpan, valueSpan: ParseSourceSpan, valueTokens: InterpolatedAttributeToken[], i18n: I18nMeta_2);
property keySpan
readonly keySpan: ParseSourceSpan;
property name
name: string;
property value
value: string;
property valueSpan
valueSpan: ParseSourceSpan;
property valueTokens
valueTokens: InterpolatedAttributeToken[];
method visit
visit: (visitor: Visitor, context: any) => any;
class Block
class Block extends NodeWithI18n {}
constructor
constructor( name: string, parameters: BlockParameter[], children: Node_2[], sourceSpan: ParseSourceSpan, nameSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan?: ParseSourceSpan, i18n?: I18nMeta_2);
property children
children: Node_2[];
property endSourceSpan
endSourceSpan: ParseSourceSpan;
property name
name: string;
property nameSpan
nameSpan: ParseSourceSpan;
property parameters
parameters: BlockParameter[];
property startSourceSpan
startSourceSpan: ParseSourceSpan;
method visit
visit: (visitor: Visitor, context: any) => any;
class BlockParameter
class BlockParameter implements BaseNode {}
constructor
constructor(expression: string, sourceSpan: ParseSourceSpan);
property expression
expression: string;
property sourceSpan
sourceSpan: ParseSourceSpan;
method visit
visit: (visitor: Visitor, context: any) => any;
class Comment
class Comment_2 implements BaseNode {}
constructor
constructor(value: string, sourceSpan: ParseSourceSpan);
property sourceSpan
sourceSpan: ParseSourceSpan;
property value
value: string;
method visit
visit: (visitor: Visitor, context: any) => any;
class Element
class Element_2 extends NodeWithI18n {}
constructor
constructor( name: string, attrs: Attribute[], children: Node_2[], sourceSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan?: ParseSourceSpan, i18n?: I18nMeta_2);
property attrs
attrs: Attribute[];
property children
children: Node_2[];
property endSourceSpan
endSourceSpan: ParseSourceSpan;
property name
name: string;
property startSourceSpan
startSourceSpan: ParseSourceSpan;
method visit
visit: (visitor: Visitor, context: any) => any;
class Expansion
class Expansion extends NodeWithI18n {}
constructor
constructor( switchValue: string, type: string, cases: ExpansionCase[], sourceSpan: ParseSourceSpan, switchValueSourceSpan: ParseSourceSpan, i18n?: I18nMeta_2);
property cases
cases: ExpansionCase[];
property switchValue
switchValue: string;
property switchValueSourceSpan
switchValueSourceSpan: ParseSourceSpan;
property type
type: string;
method visit
visit: (visitor: Visitor, context: any) => any;
class ExpansionCase
class ExpansionCase implements BaseNode {}
constructor
constructor( value: string, expression: Node_2[], sourceSpan: ParseSourceSpan, valueSourceSpan: ParseSourceSpan, expSourceSpan: ParseSourceSpan);
property expression
expression: Node_2[];
property expSourceSpan
expSourceSpan: ParseSourceSpan;
property sourceSpan
sourceSpan: ParseSourceSpan;
property value
value: string;
property valueSourceSpan
valueSourceSpan: ParseSourceSpan;
method visit
visit: (visitor: Visitor, context: any) => any;
class LetDeclaration
class LetDeclaration implements BaseNode {}
constructor
constructor( name: string, value: string, sourceSpan: ParseSourceSpan, nameSpan: ParseSourceSpan, valueSpan: ParseSourceSpan);
property name
name: string;
property nameSpan
readonly nameSpan: ParseSourceSpan;
property sourceSpan
sourceSpan: ParseSourceSpan;
property value
value: string;
property valueSpan
valueSpan: ParseSourceSpan;
method visit
visit: (visitor: Visitor, context: any) => any;
class NodeWithI18n
abstract class NodeWithI18n implements BaseNode {}
constructor
constructor(sourceSpan: ParseSourceSpan, i18n?: I18nMeta_2);
property i18n
i18n?: I18nMeta_2;
property sourceSpan
sourceSpan: ParseSourceSpan;
method visit
abstract visit: (visitor: Visitor, context: any) => any;
class RecursiveVisitor
class RecursiveVisitor implements Visitor {}
constructor
constructor();
method visitAttribute
visitAttribute: (ast: Attribute, context: any) => any;
method visitBlock
visitBlock: (block: Block, context: any) => any;
method visitBlockParameter
visitBlockParameter: (ast: BlockParameter, context: any) => any;
method visitComment
visitComment: (ast: Comment_2, context: any) => any;
method visitElement
visitElement: (ast: Element_2, context: any) => any;
method visitExpansion
visitExpansion: (ast: Expansion, context: any) => any;
method visitExpansionCase
visitExpansionCase: (ast: ExpansionCase, context: any) => any;
method visitLetDeclaration
visitLetDeclaration: (decl: LetDeclaration, context: any) => void;
method visitText
visitText: (ast: Text_2, context: any) => any;
class Text
class Text_2 extends NodeWithI18n {}
constructor
constructor( value: string, sourceSpan: ParseSourceSpan, tokens: InterpolatedTextToken[], i18n?: I18nMeta_2);
property tokens
tokens: InterpolatedTextToken[];
property value
value: string;
method visit
visit: (visitor: Visitor, context: any) => any;
interface Visitor
interface Visitor {}
method visit
visit: (node: Node_2, context: any) => any;
method visitAttribute
visitAttribute: (attribute: Attribute, context: any) => any;
method visitBlock
visitBlock: (block: Block, context: any) => any;
method visitBlockParameter
visitBlockParameter: (parameter: BlockParameter, context: any) => any;
method visitComment
visitComment: (comment: Comment_2, context: any) => any;
method visitElement
visitElement: (element: Element_2, context: any) => any;
method visitExpansion
visitExpansion: (expansion: Expansion, context: any) => any;
method visitExpansionCase
visitExpansionCase: (expansionCase: ExpansionCase, context: any) => any;
method visitLetDeclaration
visitLetDeclaration: (decl: LetDeclaration, context: any) => any;
method visitText
visitText: (text: Text_2, context: any) => any;
type Node
type Node_2 = | Attribute | Comment_2 | Element_2 | Expansion | ExpansionCase | Text_2 | Block | BlockParameter;
namespace i18n
namespace i18n {}
class BlockPlaceholder
class BlockPlaceholder implements Node_3 {}
constructor
constructor( name: string, parameters: string[], startName: string, closeName: string, children: Node_3[], sourceSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan);
property children
children: Node_3[];
property closeName
closeName: string;
property endSourceSpan
endSourceSpan: ParseSourceSpan;
property name
name: string;
property parameters
parameters: string[];
property sourceSpan
sourceSpan: ParseSourceSpan;
property startName
startName: string;
property startSourceSpan
startSourceSpan: ParseSourceSpan;
method visit
visit: (visitor: Visitor_2, context?: any) => any;
class CloneVisitor
class CloneVisitor implements Visitor_2 {}
method visitBlockPlaceholder
visitBlockPlaceholder: (ph: BlockPlaceholder, context?: any) => BlockPlaceholder;
method visitContainer
visitContainer: (container: Container, context?: any) => Container;
method visitIcu
visitIcu: (icu: Icu, context?: any) => Icu;
method visitIcuPlaceholder
visitIcuPlaceholder: (ph: IcuPlaceholder, context?: any) => IcuPlaceholder;
method visitPlaceholder
visitPlaceholder: (ph: Placeholder, context?: any) => Placeholder;
method visitTagPlaceholder
visitTagPlaceholder: (ph: TagPlaceholder, context?: any) => TagPlaceholder;
method visitText
visitText: (text: Text_3, context?: any) => Text_3;
class Container
class Container implements Node_3 {}
constructor
constructor(children: Node_3[], sourceSpan: ParseSourceSpan);
property children
children: Node_3[];
property sourceSpan
sourceSpan: ParseSourceSpan;
method visit
visit: (visitor: Visitor_2, context?: any) => any;
class Icu
class Icu implements Node_3 {}
constructor
constructor( expression: string, type: string, cases: { [k: string]: Node_3 }, sourceSpan: ParseSourceSpan, expressionPlaceholder?: string);
property cases
cases: { [k: string]: Node_3 };
property expression
expression: string;
property expressionPlaceholder
expressionPlaceholder?: string;
property sourceSpan
sourceSpan: ParseSourceSpan;
property type
type: string;
method visit
visit: (visitor: Visitor_2, context?: any) => any;
class IcuPlaceholder
class IcuPlaceholder implements Node_3 {}
constructor
constructor(value: Icu, name: string, sourceSpan: ParseSourceSpan);
property name
name: string;
property previousMessage
previousMessage?: Message;
Used to capture a message computed from a previous processing pass (see
setI18nRefs()
).
property sourceSpan
sourceSpan: ParseSourceSpan;
property value
value: Icu;
method visit
visit: (visitor: Visitor_2, context?: any) => any;
class Message
class Message {}
constructor
constructor( nodes: Node_3[], placeholders: { [phName: string]: MessagePlaceholder }, placeholderToMessage: { [phName: string]: Message }, meaning: string, description: string, customId: string);
Parameter nodes
message AST
Parameter placeholders
maps placeholder names to static content and their source spans
Parameter placeholderToMessage
maps placeholder names to messages (used for nested ICU messages)
Parameter meaning
Parameter description
Parameter customId
property customId
customId: string;
property description
description: string;
property id
id: string;
property legacyIds
legacyIds: string[];
The ids to use if there are no custom id and if
i18nLegacyMessageIdFormat
is not empty
property meaning
meaning: string;
property messageString
messageString: string;
property nodes
nodes: Node_3[];
property placeholders
placeholders: { [phName: string]: MessagePlaceholder };
property placeholderToMessage
placeholderToMessage: { [phName: string]: Message };
property sources
sources: MessageSpan[];
class Placeholder
class Placeholder implements Node_3 {}
constructor
constructor(value: string, name: string, sourceSpan: ParseSourceSpan);
property name
name: string;
property sourceSpan
sourceSpan: ParseSourceSpan;
property value
value: string;
method visit
visit: (visitor: Visitor_2, context?: any) => any;
class RecurseVisitor
class RecurseVisitor implements Visitor_2 {}
method visitBlockPlaceholder
visitBlockPlaceholder: (ph: BlockPlaceholder, context?: any) => any;
method visitContainer
visitContainer: (container: Container, context?: any) => any;
method visitIcu
visitIcu: (icu: Icu, context?: any) => any;
method visitIcuPlaceholder
visitIcuPlaceholder: (ph: IcuPlaceholder, context?: any) => any;
method visitPlaceholder
visitPlaceholder: (ph: Placeholder, context?: any) => any;
method visitTagPlaceholder
visitTagPlaceholder: (ph: TagPlaceholder, context?: any) => any;
method visitText
visitText: (text: Text_3, context?: any) => any;
class TagPlaceholder
class TagPlaceholder implements Node_3 {}
constructor
constructor( tag: string, attrs: { [k: string]: string }, startName: string, closeName: string, children: Node_3[], isVoid: boolean, sourceSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan);
property attrs
attrs: { [k: string]: string };
property children
children: Node_3[];
property closeName
closeName: string;
property endSourceSpan
endSourceSpan: ParseSourceSpan;
property isVoid
isVoid: boolean;
property sourceSpan
sourceSpan: ParseSourceSpan;
property startName
startName: string;
property startSourceSpan
startSourceSpan: ParseSourceSpan;
property tag
tag: string;
method visit
visit: (visitor: Visitor_2, context?: any) => any;
class Text
class Text_3 implements Node_3 {}
constructor
constructor(value: string, sourceSpan: ParseSourceSpan);
property sourceSpan
sourceSpan: ParseSourceSpan;
property value
value: string;
method visit
visit: (visitor: Visitor_2, context?: any) => any;
interface MessagePlaceholder
interface MessagePlaceholder {}
Describes the text contents of a placeholder as it appears in an ICU expression, including its source span information.
property sourceSpan
sourceSpan: ParseSourceSpan;
The source span of the placeholder
property text
text: string;
The text contents of the placeholder
interface MessageSpan
interface MessageSpan {}
interface Node
interface Node_3 {}
property sourceSpan
sourceSpan: ParseSourceSpan;
method visit
visit: (visitor: Visitor_2, context?: any) => any;
interface Visitor
interface Visitor_2 {}
method visitBlockPlaceholder
visitBlockPlaceholder: (ph: BlockPlaceholder, context?: any) => any;
method visitContainer
visitContainer: (container: Container, context?: any) => any;
method visitIcu
visitIcu: (icu: Icu, context?: any) => any;
method visitIcuPlaceholder
visitIcuPlaceholder: (ph: IcuPlaceholder, context?: any) => any;
method visitPlaceholder
visitPlaceholder: (ph: Placeholder, context?: any) => any;
method visitTagPlaceholder
visitTagPlaceholder: (ph: TagPlaceholder, context?: any) => any;
method visitText
visitText: (text: Text_3, context?: any) => any;
type I18nMeta
type I18nMeta_2 = Message | Node_3;
Each HTML node that is affect by an i18n tag will also have an
i18n
property that is of typeI18nMeta
. This information is either aMessage
, which indicates it is the root of an i18n message, or aNode
, which indicates is it part of a containingMessage
.
namespace outputAst
namespace outputAst {}
variable BOOL_TYPE
const BOOL_TYPE: BuiltinType;
variable DYNAMIC_TYPE
const DYNAMIC_TYPE: BuiltinType;
variable FUNCTION_TYPE
const FUNCTION_TYPE: BuiltinType;
variable INFERRED_TYPE
const INFERRED_TYPE: BuiltinType;
variable INT_TYPE
const INT_TYPE: BuiltinType;
variable NONE_TYPE
const NONE_TYPE: BuiltinType;
variable NULL_EXPR
const NULL_EXPR: LiteralExpr;
variable NUMBER_TYPE
const NUMBER_TYPE: BuiltinType;
variable STRING_TYPE
const STRING_TYPE: BuiltinType;
variable TYPED_NULL_EXPR
const TYPED_NULL_EXPR: LiteralExpr;
function areAllEquivalent
areAllEquivalent: <T extends { isEquivalent(other: T): boolean }>( base: T[], other: T[]) => boolean;
function arrowFn
arrowFn: ( params: FnParam[], body: Expression | Statement[], type?: Type | null, sourceSpan?: ParseSourceSpan | null) => ArrowFunctionExpr;
function expressionType
expressionType: ( expr: Expression, typeModifiers?: TypeModifier, typeParams?: Type[] | null) => ExpressionType;
function fn
fn: ( params: FnParam[], body: Statement[], type?: Type | null, sourceSpan?: ParseSourceSpan | null, name?: string | null) => FunctionExpr;
function ifStmt
ifStmt: ( condition: Expression, thenClause: Statement[], elseClause?: Statement[], sourceSpan?: ParseSourceSpan, leadingComments?: LeadingComment[]) => IfStmt;
function importExpr
importExpr: ( id: ExternalReference, typeParams?: Type[] | null, sourceSpan?: ParseSourceSpan | null) => ExternalExpr;
function importType
importType: ( id: ExternalReference, typeParams?: Type[] | null, typeModifiers?: TypeModifier) => ExpressionType | null;
function isNull
isNull: (exp: Expression) => boolean;
function jsDocComment
jsDocComment: (tags?: JSDocTag[]) => JSDocComment;
function leadingComment
leadingComment: ( text: string, multiline?: boolean, trailingNewline?: boolean) => LeadingComment;
function literal
literal: ( value: any, type?: Type | null, sourceSpan?: ParseSourceSpan | null) => LiteralExpr;
function literalArr
literalArr: ( values: Expression[], type?: Type | null, sourceSpan?: ParseSourceSpan | null) => LiteralArrayExpr;
function literalMap
literalMap: ( values: { key: string; quoted: boolean; value: Expression }[], type?: MapType | null) => LiteralMapExpr;
function localizedString
localizedString: ( metaBlock: I18nMeta, messageParts: LiteralPiece[], placeholderNames: PlaceholderPiece[], expressions: Expression[], sourceSpan?: ParseSourceSpan | null) => LocalizedString;
function not
not: (expr: Expression, sourceSpan?: ParseSourceSpan | null) => NotExpr;
function nullSafeIsEquivalent
nullSafeIsEquivalent: <T extends { isEquivalent(other: T): boolean }>( base: T | null, other: T | null) => boolean;
function taggedTemplate
taggedTemplate: ( tag: Expression, template: TemplateLiteral, type?: Type | null, sourceSpan?: ParseSourceSpan | null) => TaggedTemplateExpr;
function transplantedType
transplantedType: <T>( type: T, typeModifiers?: TypeModifier) => TransplantedType<T>;
function typeofExpr
typeofExpr: (expr: Expression) => TypeofExpr;
function unary
unary: ( operator: UnaryOperator, expr: Expression, type?: Type, sourceSpan?: ParseSourceSpan | null) => UnaryOperatorExpr;
function variable
variable: ( name: string, type?: Type | null, sourceSpan?: ParseSourceSpan | null) => ReadVarExpr;
class ArrayType
class ArrayType extends Type {}
constructor
constructor(of: Type, modifiers?: TypeModifier);
property of
of: Type;
method visitType
visitType: (visitor: TypeVisitor, context: any) => any;
class ArrowFunctionExpr
class ArrowFunctionExpr extends Expression {}
constructor
constructor( params: FnParam[], body: Expression | Statement[], type?: Type, sourceSpan?: ParseSourceSpan);
property body
body: Expression | Statement[];
property params
params: FnParam[];
method clone
clone: () => Expression;
method isConstant
isConstant: () => boolean;
method isEquivalent
isEquivalent: (e: Expression) => boolean;
method toDeclStmt
toDeclStmt: (name: string, modifiers?: StmtModifier) => DeclareVarStmt;
method visitExpression
visitExpression: (visitor: ExpressionVisitor, context: any) => any;
class BinaryOperatorExpr
class BinaryOperatorExpr extends Expression {}
constructor
constructor( operator: BinaryOperator, lhs: Expression, rhs: Expression, type?: Type, sourceSpan?: ParseSourceSpan, parens?: boolean);
property lhs
lhs: Expression;
property operator
operator: BinaryOperator;
property parens
parens: boolean;
property rhs
rhs: Expression;
method clone
clone: () => BinaryOperatorExpr;
method isConstant
isConstant: () => boolean;
method isEquivalent
isEquivalent: (e: Expression) => boolean;
method visitExpression
visitExpression: (visitor: ExpressionVisitor, context: any) => any;
class BuiltinType
class BuiltinType extends Type {}
constructor
constructor(name: BuiltinTypeName, modifiers?: TypeModifier);
property name
name: BuiltinTypeName;
method visitType
visitType: (visitor: TypeVisitor, context: any) => any;
class CommaExpr
class CommaExpr extends Expression {}
constructor
constructor(parts: Expression[], sourceSpan?: ParseSourceSpan);
property parts
parts: Expression[];
method clone
clone: () => CommaExpr;
method isConstant
isConstant: () => boolean;
method isEquivalent
isEquivalent: (e: Expression) => boolean;
method visitExpression
visitExpression: (visitor: ExpressionVisitor, context: any) => any;
class ConditionalExpr
class ConditionalExpr extends Expression {}
constructor
constructor( condition: Expression, trueCase: Expression, falseCase?: Expression, type?: Type, sourceSpan?: ParseSourceSpan);
property condition
condition: Expression;
property falseCase
falseCase: Expression;
property trueCase
trueCase: Expression;
method clone
clone: () => ConditionalExpr;
method isConstant
isConstant: () => boolean;
method isEquivalent
isEquivalent: (e: Expression) => boolean;
method visitExpression
visitExpression: (visitor: ExpressionVisitor, context: any) => any;
class DeclareFunctionStmt
class DeclareFunctionStmt extends Statement {}
constructor
constructor( name: string, params: FnParam[], statements: Statement[], type?: Type, modifiers?: StmtModifier, sourceSpan?: ParseSourceSpan, leadingComments?: LeadingComment[]);
property name
name: string;
property params
params: FnParam[];
property statements
statements: Statement[];
property type
type: Type;
method isEquivalent
isEquivalent: (stmt: Statement) => boolean;
method visitStatement
visitStatement: (visitor: StatementVisitor, context: any) => any;
class DeclareVarStmt
class DeclareVarStmt extends Statement {}
constructor
constructor( name: string, value?: Expression, type?: Type, modifiers?: StmtModifier, sourceSpan?: ParseSourceSpan, leadingComments?: LeadingComment[]);
property name
name: string;
property type
type: Type;
property value
value?: Expression;
method isEquivalent
isEquivalent: (stmt: Statement) => boolean;
method visitStatement
visitStatement: (visitor: StatementVisitor, context: any) => any;
class DynamicImportExpr
class DynamicImportExpr extends Expression {}
constructor
constructor( url: string | Expression, sourceSpan?: ParseSourceSpan, urlComment?: string);
property url
url: string | Expression;
property urlComment
urlComment?: string;
method clone
clone: () => DynamicImportExpr;
method isConstant
isConstant: () => boolean;
method isEquivalent
isEquivalent: (e: Expression) => boolean;
method visitExpression
visitExpression: (visitor: ExpressionVisitor, context: any) => any;
class Expression
abstract class Expression {}
constructor
constructor(type: Type, sourceSpan?: ParseSourceSpan);
property sourceSpan
sourceSpan: ParseSourceSpan;
property type
type: Type;
method and
and: ( rhs: Expression, sourceSpan?: ParseSourceSpan | null) => BinaryOperatorExpr;
method bigger
bigger: ( rhs: Expression, sourceSpan?: ParseSourceSpan | null) => BinaryOperatorExpr;
method biggerEquals
biggerEquals: ( rhs: Expression, sourceSpan?: ParseSourceSpan | null) => BinaryOperatorExpr;
method bitwiseAnd
bitwiseAnd: ( rhs: Expression, sourceSpan?: ParseSourceSpan | null, parens?: boolean) => BinaryOperatorExpr;
method bitwiseOr
bitwiseOr: ( rhs: Expression, sourceSpan?: ParseSourceSpan | null, parens?: boolean) => BinaryOperatorExpr;
method callFn
callFn: ( params: Expression[], sourceSpan?: ParseSourceSpan | null, pure?: boolean) => InvokeFunctionExpr;
method clone
abstract clone: () => Expression;
method conditional
conditional: ( trueCase: Expression, falseCase?: Expression | null, sourceSpan?: ParseSourceSpan | null) => ConditionalExpr;
method divide
divide: ( rhs: Expression, sourceSpan?: ParseSourceSpan | null) => BinaryOperatorExpr;
method equals
equals: ( rhs: Expression, sourceSpan?: ParseSourceSpan | null) => BinaryOperatorExpr;
method identical
identical: ( rhs: Expression, sourceSpan?: ParseSourceSpan | null) => BinaryOperatorExpr;
method instantiate
instantiate: ( params: Expression[], type?: Type | null, sourceSpan?: ParseSourceSpan | null) => InstantiateExpr;
method isBlank
isBlank: (sourceSpan?: ParseSourceSpan | null) => Expression;
method isConstant
abstract isConstant: () => boolean;
Return true if the expression is constant.
method isEquivalent
abstract isEquivalent: (e: Expression) => boolean;
Calculates whether this expression produces the same value as the given expression. Note: We don't check Types nor ParseSourceSpans nor function arguments.
method key
key: ( index: Expression, type?: Type | null, sourceSpan?: ParseSourceSpan | null) => ReadKeyExpr;
method lower
lower: ( rhs: Expression, sourceSpan?: ParseSourceSpan | null) => BinaryOperatorExpr;
method lowerEquals
lowerEquals: ( rhs: Expression, sourceSpan?: ParseSourceSpan | null) => BinaryOperatorExpr;
method minus
minus: ( rhs: Expression, sourceSpan?: ParseSourceSpan | null) => BinaryOperatorExpr;
method modulo
modulo: ( rhs: Expression, sourceSpan?: ParseSourceSpan | null) => BinaryOperatorExpr;
method multiply
multiply: ( rhs: Expression, sourceSpan?: ParseSourceSpan | null) => BinaryOperatorExpr;
method notEquals
notEquals: ( rhs: Expression, sourceSpan?: ParseSourceSpan | null) => BinaryOperatorExpr;
method notIdentical
notIdentical: ( rhs: Expression, sourceSpan?: ParseSourceSpan | null) => BinaryOperatorExpr;
method nullishCoalesce
nullishCoalesce: ( rhs: Expression, sourceSpan?: ParseSourceSpan | null) => BinaryOperatorExpr;
method or
or: (rhs: Expression, sourceSpan?: ParseSourceSpan | null) => BinaryOperatorExpr;
method plus
plus: ( rhs: Expression, sourceSpan?: ParseSourceSpan | null) => BinaryOperatorExpr;
method prop
prop: (name: string, sourceSpan?: ParseSourceSpan | null) => ReadPropExpr;
method toStmt
toStmt: () => Statement;
method visitExpression
abstract visitExpression: (visitor: ExpressionVisitor, context: any) => any;
class ExpressionStatement
class ExpressionStatement extends Statement {}
constructor
constructor( expr: Expression, sourceSpan?: ParseSourceSpan, leadingComments?: LeadingComment[]);
property expr
expr: Expression;
method isEquivalent
isEquivalent: (stmt: Statement) => boolean;
method visitStatement
visitStatement: (visitor: StatementVisitor, context: any) => any;
class ExpressionType
class ExpressionType extends Type {}
constructor
constructor(value: Expression, modifiers?: TypeModifier, typeParams?: Type[]);
property typeParams
typeParams: Type[];
property value
value: Expression;
method visitType
visitType: (visitor: TypeVisitor, context: any) => any;
class ExternalExpr
class ExternalExpr extends Expression {}
constructor
constructor( value: ExternalReference, type?: Type, typeParams?: Type[], sourceSpan?: ParseSourceSpan);
property typeParams
typeParams: Type[];
property value
value: ExternalReference;
method clone
clone: () => ExternalExpr;
method isConstant
isConstant: () => boolean;
method isEquivalent
isEquivalent: (e: Expression) => boolean;
method visitExpression
visitExpression: (visitor: ExpressionVisitor, context: any) => any;
class ExternalReference
class ExternalReference {}
constructor
constructor(moduleName: string, name: string);
property moduleName
moduleName: string;
property name
name: string;
class FnParam
class FnParam {}
constructor
constructor(name: string, type?: Type);
property name
name: string;
property type
type: Type;
method clone
clone: () => FnParam;
method isEquivalent
isEquivalent: (param: FnParam) => boolean;
class FunctionExpr
class FunctionExpr extends Expression {}
constructor
constructor( params: FnParam[], statements: Statement[], type?: Type, sourceSpan?: ParseSourceSpan, name?: string);
property name
name?: string;
property params
params: FnParam[];
property statements
statements: Statement[];
method clone
clone: () => FunctionExpr;
method isConstant
isConstant: () => boolean;
method isEquivalent
isEquivalent: (e: Expression | Statement) => boolean;
method toDeclStmt
toDeclStmt: (name: string, modifiers?: StmtModifier) => DeclareFunctionStmt;
method visitExpression
visitExpression: (visitor: ExpressionVisitor, context: any) => any;
class IfStmt
class IfStmt extends Statement {}
constructor
constructor( condition: Expression, trueCase: Statement[], falseCase?: Statement[], sourceSpan?: ParseSourceSpan, leadingComments?: LeadingComment[]);
property condition
condition: Expression;
property falseCase
falseCase: Statement[];
property trueCase
trueCase: Statement[];
method isEquivalent
isEquivalent: (stmt: Statement) => boolean;
method visitStatement
visitStatement: (visitor: StatementVisitor, context: any) => any;
class InstantiateExpr
class InstantiateExpr extends Expression {}
constructor
constructor( classExpr: Expression, args: Expression[], type?: Type, sourceSpan?: ParseSourceSpan);
property args
args: Expression[];
property classExpr
classExpr: Expression;
method clone
clone: () => InstantiateExpr;
method isConstant
isConstant: () => boolean;
method isEquivalent
isEquivalent: (e: Expression) => boolean;
method visitExpression
visitExpression: (visitor: ExpressionVisitor, context: any) => any;
class InvokeFunctionExpr
class InvokeFunctionExpr extends Expression {}
constructor
constructor( fn: Expression, args: Expression[], type?: Type, sourceSpan?: ParseSourceSpan, pure?: boolean);
property args
args: Expression[];
property fn
fn: Expression;
property pure
pure: boolean;
property receiver
readonly receiver: Expression;
method clone
clone: () => InvokeFunctionExpr;
method isConstant
isConstant: () => boolean;
method isEquivalent
isEquivalent: (e: Expression) => boolean;
method visitExpression
visitExpression: (visitor: ExpressionVisitor, context: any) => any;
class JSDocComment
class JSDocComment extends LeadingComment {}
constructor
constructor(tags: JSDocTag[]);
property tags
tags: JSDocTag[];
method toString
toString: () => string;
class LeadingComment
class LeadingComment {}
constructor
constructor(text: string, multiline: boolean, trailingNewline: boolean);
property multiline
multiline: boolean;
property text
text: string;
property trailingNewline
trailingNewline: boolean;
method toString
toString: () => string;
class LiteralArrayExpr
class LiteralArrayExpr extends Expression {}
constructor
constructor(entries: Expression[], type?: Type, sourceSpan?: ParseSourceSpan);
property entries
entries: Expression[];
method clone
clone: () => LiteralArrayExpr;
method isConstant
isConstant: () => boolean;
method isEquivalent
isEquivalent: (e: Expression) => boolean;
method visitExpression
visitExpression: (visitor: ExpressionVisitor, context: any) => any;
class LiteralExpr
class LiteralExpr extends Expression {}
constructor
constructor( value: string | number | boolean, type?: Type, sourceSpan?: ParseSourceSpan);
property value
value: string | number | boolean;
method clone
clone: () => LiteralExpr;
method isConstant
isConstant: () => boolean;
method isEquivalent
isEquivalent: (e: Expression) => boolean;
method visitExpression
visitExpression: (visitor: ExpressionVisitor, context: any) => any;
class LiteralMapEntry
class LiteralMapEntry {}
constructor
constructor(key: string, value: Expression, quoted: boolean);
property key
key: string;
property quoted
quoted: boolean;
property value
value: Expression;
method clone
clone: () => LiteralMapEntry;
method isEquivalent
isEquivalent: (e: LiteralMapEntry) => boolean;
class LiteralMapExpr
class LiteralMapExpr extends Expression {}
constructor
constructor( entries: LiteralMapEntry[], type?: MapType, sourceSpan?: ParseSourceSpan);
property entries
entries: LiteralMapEntry[];
property valueType
valueType: Type;
method clone
clone: () => LiteralMapExpr;
method isConstant
isConstant: () => boolean;
method isEquivalent
isEquivalent: (e: Expression) => boolean;
method visitExpression
visitExpression: (visitor: ExpressionVisitor, context: any) => any;
class LiteralPiece
class LiteralPiece {}
constructor
constructor(text: string, sourceSpan: ParseSourceSpan);
property sourceSpan
sourceSpan: ParseSourceSpan;
property text
text: string;
class LocalizedString
class LocalizedString extends Expression {}
constructor
constructor( metaBlock: I18nMeta, messageParts: LiteralPiece[], placeHolderNames: PlaceholderPiece[], expressions: Expression[], sourceSpan?: ParseSourceSpan);
property expressions
readonly expressions: Expression[];
property messageParts
readonly messageParts: LiteralPiece[];
property metaBlock
readonly metaBlock: I18nMeta;
property placeHolderNames
readonly placeHolderNames: PlaceholderPiece[];
method clone
clone: () => LocalizedString;
method getMessagePartSourceSpan
getMessagePartSourceSpan: (i: number) => ParseSourceSpan | null;
method getPlaceholderSourceSpan
getPlaceholderSourceSpan: (i: number) => ParseSourceSpan;
method isConstant
isConstant: () => boolean;
method isEquivalent
isEquivalent: (e: Expression) => boolean;
method serializeI18nHead
serializeI18nHead: () => CookedRawString;
Serialize the given
meta
andmessagePart
into "cooked" and "raw" strings that can be used in a$localize
tagged string. The format of the metadata is the same as that parsed byparseI18nMeta()
.Parameter meta
The metadata to serialize
Parameter messagePart
The first part of the tagged string
method serializeI18nTemplatePart
serializeI18nTemplatePart: (partIndex: number) => CookedRawString;
Serialize the given
placeholderName
andmessagePart
into "cooked" and "raw" strings that can be used in a$localize
tagged string.The format is
:<placeholder-name>[@@<associated-id>]:
.The
associated-id
is the message id of the (usually an ICU) message to which this placeholder refers.Parameter partIndex
The index of the message part to serialize.
method visitExpression
visitExpression: (visitor: ExpressionVisitor, context: any) => any;
class MapType
class MapType extends Type {}
constructor
constructor(valueType: Type, modifiers?: TypeModifier);
property valueType
valueType: Type;
method visitType
visitType: (visitor: TypeVisitor, context: any) => any;
class NotExpr
class NotExpr extends Expression {}
constructor
constructor(condition: Expression, sourceSpan?: ParseSourceSpan);
property condition
condition: Expression;
method clone
clone: () => NotExpr;
method isConstant
isConstant: () => boolean;
method isEquivalent
isEquivalent: (e: Expression) => boolean;
method visitExpression
visitExpression: (visitor: ExpressionVisitor, context: any) => any;
class PlaceholderPiece
class PlaceholderPiece {}
constructor
constructor( text: string, sourceSpan: ParseSourceSpan, associatedMessage?: Message);
Create a new instance of a
PlaceholderPiece
.Parameter text
the name of this placeholder (e.g.
PH_1
).Parameter sourceSpan
the location of this placeholder in its localized message the source code.
Parameter associatedMessage
reference to another message that this placeholder is associated with. The
associatedMessage
is mainly used to provide a relationship to an ICU message that has been extracted out from the message containing the placeholder.
property associatedMessage
associatedMessage?: Message;
property sourceSpan
sourceSpan: ParseSourceSpan;
property text
text: string;
class ReadKeyExpr
class ReadKeyExpr extends Expression {}
constructor
constructor( receiver: Expression, index: Expression, type?: Type, sourceSpan?: ParseSourceSpan);
property index
index: Expression;
property receiver
receiver: Expression;
method clone
clone: () => ReadKeyExpr;
method isConstant
isConstant: () => boolean;
method isEquivalent
isEquivalent: (e: Expression) => boolean;
method set
set: (value: Expression) => WriteKeyExpr;
method visitExpression
visitExpression: (visitor: ExpressionVisitor, context: any) => any;
class ReadPropExpr
class ReadPropExpr extends Expression {}
constructor
constructor( receiver: Expression, name: string, type?: Type, sourceSpan?: ParseSourceSpan);
property index
readonly index: string;
property name
name: string;
property receiver
receiver: Expression;
method clone
clone: () => ReadPropExpr;
method isConstant
isConstant: () => boolean;
method isEquivalent
isEquivalent: (e: Expression) => boolean;
method set
set: (value: Expression) => WritePropExpr;
method visitExpression
visitExpression: (visitor: ExpressionVisitor, context: any) => any;
class ReadVarExpr
class ReadVarExpr extends Expression {}
constructor
constructor(name: string, type?: Type, sourceSpan?: ParseSourceSpan);
property name
name: string;
method clone
clone: () => ReadVarExpr;
method isConstant
isConstant: () => boolean;
method isEquivalent
isEquivalent: (e: Expression) => boolean;
method set
set: (value: Expression) => WriteVarExpr;
method visitExpression
visitExpression: (visitor: ExpressionVisitor, context: any) => any;
class RecursiveAstVisitor
class RecursiveAstVisitor_2 implements StatementVisitor, ExpressionVisitor {}
method visitAllExpressions
visitAllExpressions: (exprs: Expression[], context: any) => void;
method visitAllStatements
visitAllStatements: (stmts: Statement[], context: any) => void;
method visitArrayType
visitArrayType: (type: ArrayType, context: any) => any;
method visitArrowFunctionExpr
visitArrowFunctionExpr: (ast: ArrowFunctionExpr, context: any) => any;
method visitBinaryOperatorExpr
visitBinaryOperatorExpr: (ast: BinaryOperatorExpr, context: any) => any;
method visitBuiltinType
visitBuiltinType: (type: BuiltinType, context: any) => any;
method visitCommaExpr
visitCommaExpr: (ast: CommaExpr, context: any) => any;
method visitConditionalExpr
visitConditionalExpr: (ast: ConditionalExpr, context: any) => any;
method visitDeclareFunctionStmt
visitDeclareFunctionStmt: (stmt: DeclareFunctionStmt, context: any) => any;
method visitDeclareVarStmt
visitDeclareVarStmt: (stmt: DeclareVarStmt, context: any) => any;
method visitDynamicImportExpr
visitDynamicImportExpr: (ast: DynamicImportExpr, context: any) => any;
method visitExpression
visitExpression: (ast: Expression, context: any) => any;
method visitExpressionStmt
visitExpressionStmt: (stmt: ExpressionStatement, context: any) => any;
method visitExpressionType
visitExpressionType: (type: ExpressionType, context: any) => any;
method visitExternalExpr
visitExternalExpr: (ast: ExternalExpr, context: any) => any;
method visitFunctionExpr
visitFunctionExpr: (ast: FunctionExpr, context: any) => any;
method visitIfStmt
visitIfStmt: (stmt: IfStmt, context: any) => any;
method visitInstantiateExpr
visitInstantiateExpr: (ast: InstantiateExpr, context: any) => any;
method visitInvokeFunctionExpr
visitInvokeFunctionExpr: (ast: InvokeFunctionExpr, context: any) => any;
method visitLiteralArrayExpr
visitLiteralArrayExpr: (ast: LiteralArrayExpr, context: any) => any;
method visitLiteralExpr
visitLiteralExpr: (ast: LiteralExpr, context: any) => any;
method visitLiteralMapExpr
visitLiteralMapExpr: (ast: LiteralMapExpr, context: any) => any;
method visitLocalizedString
visitLocalizedString: (ast: LocalizedString, context: any) => any;
method visitMapType
visitMapType: (type: MapType, context: any) => any;
method visitNotExpr
visitNotExpr: (ast: NotExpr, context: any) => any;
method visitReadKeyExpr
visitReadKeyExpr: (ast: ReadKeyExpr, context: any) => any;
method visitReadPropExpr
visitReadPropExpr: (ast: ReadPropExpr, context: any) => any;
method visitReadVarExpr
visitReadVarExpr: (ast: ReadVarExpr, context: any) => any;
method visitReturnStmt
visitReturnStmt: (stmt: ReturnStatement, context: any) => any;
method visitTaggedTemplateExpr
visitTaggedTemplateExpr: (ast: TaggedTemplateExpr, context: any) => any;
method visitTransplantedType
visitTransplantedType: (type: TransplantedType<unknown>, context: any) => any;
method visitType
visitType: (ast: Type, context: any) => any;
method visitTypeofExpr
visitTypeofExpr: (ast: TypeofExpr, context: any) => any;
method visitUnaryOperatorExpr
visitUnaryOperatorExpr: (ast: UnaryOperatorExpr, context: any) => any;
method visitWrappedNodeExpr
visitWrappedNodeExpr: (ast: WrappedNodeExpr<any>, context: any) => any;
method visitWriteKeyExpr
visitWriteKeyExpr: (ast: WriteKeyExpr, context: any) => any;
method visitWritePropExpr
visitWritePropExpr: (ast: WritePropExpr, context: any) => any;
method visitWriteVarExpr
visitWriteVarExpr: (ast: WriteVarExpr, context: any) => any;
class ReturnStatement
class ReturnStatement extends Statement {}
constructor
constructor( value: Expression, sourceSpan?: ParseSourceSpan, leadingComments?: LeadingComment[]);
property value
value: Expression;
method isEquivalent
isEquivalent: (stmt: Statement) => boolean;
method visitStatement
visitStatement: (visitor: StatementVisitor, context: any) => any;
class Statement
abstract class Statement {}
constructor
constructor( modifiers?: StmtModifier, sourceSpan?: ParseSourceSpan, leadingComments?: LeadingComment[]);
property leadingComments
leadingComments?: LeadingComment[];
property modifiers
modifiers: StmtModifier;
property sourceSpan
sourceSpan: ParseSourceSpan;
method addLeadingComment
addLeadingComment: (leadingComment: LeadingComment) => void;
method hasModifier
hasModifier: (modifier: StmtModifier) => boolean;
method isEquivalent
abstract isEquivalent: (stmt: Statement) => boolean;
Calculates whether this statement produces the same value as the given statement. Note: We don't check Types nor ParseSourceSpans nor function arguments.
method visitStatement
abstract visitStatement: (visitor: StatementVisitor, context: any) => any;
class TaggedTemplateExpr
class TaggedTemplateExpr extends Expression {}
constructor
constructor( tag: Expression, template: TemplateLiteral, type?: Type, sourceSpan?: ParseSourceSpan);
property tag
tag: Expression;
property template
template: TemplateLiteral;
method clone
clone: () => TaggedTemplateExpr;
method isConstant
isConstant: () => boolean;
method isEquivalent
isEquivalent: (e: Expression) => boolean;
method visitExpression
visitExpression: (visitor: ExpressionVisitor, context: any) => any;
class TemplateLiteral
class TemplateLiteral {}
constructor
constructor(elements: TemplateLiteralElement[], expressions: Expression[]);
property elements
elements: TemplateLiteralElement[];
property expressions
expressions: Expression[];
method clone
clone: () => TemplateLiteral;
class TemplateLiteralElement
class TemplateLiteralElement {}
constructor
constructor(text: string, sourceSpan?: ParseSourceSpan, rawText?: string);
property rawText
rawText: string;
property sourceSpan
sourceSpan?: ParseSourceSpan;
property text
text: string;
method clone
clone: () => TemplateLiteralElement;
class TransplantedType
class TransplantedType<T> extends Type {}
constructor
constructor(type: {}, modifiers?: TypeModifier);
property type
readonly type: {};
method visitType
visitType: (visitor: TypeVisitor, context: any) => any;
class Type
abstract class Type {}
constructor
constructor(modifiers?: TypeModifier);
property modifiers
modifiers: TypeModifier;
method hasModifier
hasModifier: (modifier: TypeModifier) => boolean;
method visitType
abstract visitType: (visitor: TypeVisitor, context: any) => any;
class TypeofExpr
class TypeofExpr extends Expression {}
constructor
constructor(expr: Expression, type?: Type, sourceSpan?: ParseSourceSpan);
property expr
expr: Expression;
method clone
clone: () => TypeofExpr;
method isConstant
isConstant: () => boolean;
method isEquivalent
isEquivalent: (e: Expression) => boolean;
method visitExpression
visitExpression: (visitor: ExpressionVisitor, context: any) => any;
class UnaryOperatorExpr
class UnaryOperatorExpr extends Expression {}
constructor
constructor( operator: UnaryOperator, expr: Expression, type?: Type, sourceSpan?: ParseSourceSpan, parens?: boolean);
property expr
expr: Expression;
property operator
operator: UnaryOperator;
property parens
parens: boolean;
method clone
clone: () => UnaryOperatorExpr;
method isConstant
isConstant: () => boolean;
method isEquivalent
isEquivalent: (e: Expression) => boolean;
method visitExpression
visitExpression: (visitor: ExpressionVisitor, context: any) => any;
class WrappedNodeExpr
class WrappedNodeExpr<T> extends Expression {}
constructor
constructor(node: {}, type?: Type, sourceSpan?: ParseSourceSpan);
property node
node: {};
method clone
clone: () => WrappedNodeExpr<T>;
method isConstant
isConstant: () => boolean;
method isEquivalent
isEquivalent: (e: Expression) => boolean;
method visitExpression
visitExpression: (visitor: ExpressionVisitor, context: any) => any;
class WriteKeyExpr
class WriteKeyExpr extends Expression {}
constructor
constructor( receiver: Expression, index: Expression, value: Expression, type?: Type, sourceSpan?: ParseSourceSpan);
property index
index: Expression;
property receiver
receiver: Expression;
property value
value: Expression;
method clone
clone: () => WriteKeyExpr;
method isConstant
isConstant: () => boolean;
method isEquivalent
isEquivalent: (e: Expression) => boolean;
method visitExpression
visitExpression: (visitor: ExpressionVisitor, context: any) => any;
class WritePropExpr
class WritePropExpr extends Expression {}
constructor
constructor( receiver: Expression, name: string, value: Expression, type?: Type, sourceSpan?: ParseSourceSpan);
property name
name: string;
property receiver
receiver: Expression;
property value
value: Expression;
method clone
clone: () => WritePropExpr;
method isConstant
isConstant: () => boolean;
method isEquivalent
isEquivalent: (e: Expression) => boolean;
method visitExpression
visitExpression: (visitor: ExpressionVisitor, context: any) => any;
class WriteVarExpr
class WriteVarExpr extends Expression {}
constructor
constructor( name: string, value: Expression, type?: Type, sourceSpan?: ParseSourceSpan);
property name
name: string;
property value
value: Expression;
method clone
clone: () => WriteVarExpr;
method isConstant
isConstant: () => boolean;
method isEquivalent
isEquivalent: (e: Expression) => boolean;
method toConstDecl
toConstDecl: () => DeclareVarStmt;
method toDeclStmt
toDeclStmt: (type?: Type | null, modifiers?: StmtModifier) => DeclareVarStmt;
method visitExpression
visitExpression: (visitor: ExpressionVisitor, context: any) => any;
interface CookedRawString
interface CookedRawString {}
A structure to hold the cooked and raw strings of a template literal element, along with its source-span range.
interface ExpressionVisitor
interface ExpressionVisitor {}
method visitArrowFunctionExpr
visitArrowFunctionExpr: (ast: ArrowFunctionExpr, context: any) => any;
method visitBinaryOperatorExpr
visitBinaryOperatorExpr: (ast: BinaryOperatorExpr, context: any) => any;
method visitCommaExpr
visitCommaExpr: (ast: CommaExpr, context: any) => any;
method visitConditionalExpr
visitConditionalExpr: (ast: ConditionalExpr, context: any) => any;
method visitDynamicImportExpr
visitDynamicImportExpr: (ast: DynamicImportExpr, context: any) => any;
method visitExternalExpr
visitExternalExpr: (ast: ExternalExpr, context: any) => any;
method visitFunctionExpr
visitFunctionExpr: (ast: FunctionExpr, context: any) => any;
method visitInstantiateExpr
visitInstantiateExpr: (ast: InstantiateExpr, context: any) => any;
method visitInvokeFunctionExpr
visitInvokeFunctionExpr: (ast: InvokeFunctionExpr, context: any) => any;
method visitLiteralArrayExpr
visitLiteralArrayExpr: (ast: LiteralArrayExpr, context: any) => any;
method visitLiteralExpr
visitLiteralExpr: (ast: LiteralExpr, context: any) => any;
method visitLiteralMapExpr
visitLiteralMapExpr: (ast: LiteralMapExpr, context: any) => any;
method visitLocalizedString
visitLocalizedString: (ast: LocalizedString, context: any) => any;
method visitNotExpr
visitNotExpr: (ast: NotExpr, context: any) => any;
method visitReadKeyExpr
visitReadKeyExpr: (ast: ReadKeyExpr, context: any) => any;
method visitReadPropExpr
visitReadPropExpr: (ast: ReadPropExpr, context: any) => any;
method visitReadVarExpr
visitReadVarExpr: (ast: ReadVarExpr, context: any) => any;
method visitTaggedTemplateExpr
visitTaggedTemplateExpr: (ast: TaggedTemplateExpr, context: any) => any;
method visitTypeofExpr
visitTypeofExpr: (ast: TypeofExpr, context: any) => any;
method visitUnaryOperatorExpr
visitUnaryOperatorExpr: (ast: UnaryOperatorExpr, context: any) => any;
method visitWrappedNodeExpr
visitWrappedNodeExpr: (ast: WrappedNodeExpr<any>, context: any) => any;
method visitWriteKeyExpr
visitWriteKeyExpr: (expr: WriteKeyExpr, context: any) => any;
method visitWritePropExpr
visitWritePropExpr: (expr: WritePropExpr, context: any) => any;
method visitWriteVarExpr
visitWriteVarExpr: (expr: WriteVarExpr, context: any) => any;
interface StatementVisitor
interface StatementVisitor {}
method visitDeclareFunctionStmt
visitDeclareFunctionStmt: (stmt: DeclareFunctionStmt, context: any) => any;
method visitDeclareVarStmt
visitDeclareVarStmt: (stmt: DeclareVarStmt, context: any) => any;
method visitExpressionStmt
visitExpressionStmt: (stmt: ExpressionStatement, context: any) => any;
method visitIfStmt
visitIfStmt: (stmt: IfStmt, context: any) => any;
method visitReturnStmt
visitReturnStmt: (stmt: ReturnStatement, context: any) => any;
interface TypeVisitor
interface TypeVisitor {}
method visitArrayType
visitArrayType: (type: ArrayType, context: any) => any;
method visitBuiltinType
visitBuiltinType: (type: BuiltinType, context: any) => any;
method visitExpressionType
visitExpressionType: (type: ExpressionType, context: any) => any;
method visitMapType
visitMapType: (type: MapType, context: any) => any;
method visitTransplantedType
visitTransplantedType: (type: TransplantedType<unknown>, context: any) => any;
enum BinaryOperator
enum BinaryOperator { Equals = 0, NotEquals = 1, Identical = 2, NotIdentical = 3, Minus = 4, Plus = 5, Divide = 6, Multiply = 7, Modulo = 8, And = 9, Or = 10, BitwiseOr = 11, BitwiseAnd = 12, Lower = 13, LowerEquals = 14, Bigger = 15, BiggerEquals = 16, NullishCoalesce = 17,}
member And
And = 9
member Bigger
Bigger = 15
member BiggerEquals
BiggerEquals = 16
member BitwiseAnd
BitwiseAnd = 12
member BitwiseOr
BitwiseOr = 11
member Divide
Divide = 6
member Equals
Equals = 0
member Identical
Identical = 2
member Lower
Lower = 13
member LowerEquals
LowerEquals = 14
member Minus
Minus = 4
member Modulo
Modulo = 8
member Multiply
Multiply = 7
member NotEquals
NotEquals = 1
member NotIdentical
NotIdentical = 3
member NullishCoalesce
NullishCoalesce = 17
member Or
Or = 10
member Plus
Plus = 5
enum BuiltinTypeName
enum BuiltinTypeName { Dynamic = 0, Bool = 1, String = 2, Int = 3, Number = 4, Function = 5, Inferred = 6, None = 7,}
enum JSDocTagName
const enum JSDocTagName { Desc = 'desc', Id = 'id', Meaning = 'meaning', Suppress = 'suppress',}
enum StmtModifier
enum StmtModifier { None = 0, Final = 1, Private = 2, Exported = 4, Static = 8,}
enum TypeModifier
enum TypeModifier { None = 0, Const = 1,}
enum UnaryOperator
enum UnaryOperator { Minus = 0, Plus = 1,}
type JSDocTag
type JSDocTag = | { tagName: JSDocTagName | string; text?: string; } | { tagName?: undefined; text: string; };
type MessagePiece
type MessagePiece = LiteralPiece | PlaceholderPiece;
namespace t
namespace t {}
function visitAll
visitAll: <Result>( visitor: TmplAstVisitor<Result>, nodes: TmplAstNode[]) => Result[];
class BlockNode
class TmplAstBlockNode {}
constructor
constructor( nameSpan: ParseSourceSpan, sourceSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan);
property endSourceSpan
endSourceSpan: ParseSourceSpan;
property nameSpan
nameSpan: ParseSourceSpan;
property sourceSpan
sourceSpan: ParseSourceSpan;
property startSourceSpan
startSourceSpan: ParseSourceSpan;
class BoundAttribute
class TmplAstBoundAttribute implements TmplAstNode {}
constructor
constructor( name: string, type: BindingType, securityContext: SecurityContext, value: AST, unit: string, sourceSpan: ParseSourceSpan, keySpan: ParseSourceSpan, valueSpan: ParseSourceSpan, i18n: I18nMeta_2);
property i18n
i18n: I18nMeta_2;
property keySpan
readonly keySpan: ParseSourceSpan;
property name
name: string;
property securityContext
securityContext: SecurityContext;
property sourceSpan
sourceSpan: ParseSourceSpan;
property type
type: BindingType;
property unit
unit: string;
property value
value: AST;
property valueSpan
valueSpan: ParseSourceSpan;
method fromBoundElementProperty
static fromBoundElementProperty: ( prop: BoundElementProperty, i18n?: I18nMeta_2) => TmplAstBoundAttribute;
method visit
visit: <Result>(visitor: TmplAstVisitor<Result>) => Result;
class BoundDeferredTrigger
class TmplAstBoundDeferredTrigger extends TmplAstDeferredTrigger {}
constructor
constructor( value: AST, sourceSpan: ParseSourceSpan, prefetchSpan: ParseSourceSpan, whenSourceSpan: ParseSourceSpan, hydrateSpan: ParseSourceSpan);
property value
value: AST;
class BoundEvent
class TmplAstBoundEvent implements TmplAstNode {}
constructor
constructor( name: string, type: ParsedEventType, handler: AST, target: string, phase: string, sourceSpan: ParseSourceSpan, handlerSpan: ParseSourceSpan, keySpan: ParseSourceSpan);
property handler
handler: AST;
property handlerSpan
handlerSpan: ParseSourceSpan;
property keySpan
readonly keySpan: ParseSourceSpan;
property name
name: string;
property phase
phase: string;
property sourceSpan
sourceSpan: ParseSourceSpan;
property target
target: string;
property type
type: ParsedEventType;
method fromParsedEvent
static fromParsedEvent: (event: ParsedEvent) => TmplAstBoundEvent;
method visit
visit: <Result>(visitor: TmplAstVisitor<Result>) => Result;
class BoundText
class TmplAstBoundText implements TmplAstNode {}
constructor
constructor(value: AST, sourceSpan: ParseSourceSpan, i18n?: I18nMeta_2);
property i18n
i18n?: I18nMeta_2;
property sourceSpan
sourceSpan: ParseSourceSpan;
property value
value: AST;
method visit
visit: <Result>(visitor: TmplAstVisitor<Result>) => Result;
class Comment
class Comment_3 implements TmplAstNode {}
This is an R3
Node
-like wrapper for a rawhtml.Comment
node. We do not currently require the implementation of a visitor for Comments as they are only collected at the top-level of the R3 AST, and only ifRender3ParseOptions['collectCommentNodes']
is true.
constructor
constructor(value: string, sourceSpan: ParseSourceSpan);
property sourceSpan
sourceSpan: ParseSourceSpan;
property value
value: string;
method visit
visit: <Result>(_visitor: TmplAstVisitor<Result>) => Result;
class Content
class TmplAstContent implements TmplAstNode {}
constructor
constructor( selector: string, attributes: TmplAstTextAttribute[], children: TmplAstNode[], sourceSpan: ParseSourceSpan, i18n?: I18nMeta_2);
property attributes
attributes: TmplAstTextAttribute[];
property children
children: TmplAstNode[];
property i18n
i18n?: I18nMeta_2;
property name
readonly name: string;
property selector
selector: string;
property sourceSpan
sourceSpan: ParseSourceSpan;
method visit
visit: <Result>(visitor: TmplAstVisitor<Result>) => Result;
class DeferredBlock
class TmplAstDeferredBlock extends TmplAstBlockNode implements TmplAstNode {}
constructor
constructor( children: TmplAstNode[], triggers: TmplAstDeferredBlockTriggers, prefetchTriggers: TmplAstDeferredBlockTriggers, hydrateTriggers: TmplAstDeferredBlockTriggers, placeholder: TmplAstDeferredBlockPlaceholder, loading: TmplAstDeferredBlockLoading, error: TmplAstDeferredBlockError, nameSpan: ParseSourceSpan, sourceSpan: ParseSourceSpan, mainBlockSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan, i18n?: I18nMeta_2);
property children
children: TmplAstNode[];
property error
error: TmplAstDeferredBlockError;
property hydrateTriggers
readonly hydrateTriggers: Readonly<TmplAstDeferredBlockTriggers>;
property i18n
i18n?: I18nMeta_2;
property loading
loading: TmplAstDeferredBlockLoading;
property mainBlockSpan
mainBlockSpan: ParseSourceSpan;
property placeholder
placeholder: TmplAstDeferredBlockPlaceholder;
property prefetchTriggers
readonly prefetchTriggers: Readonly<TmplAstDeferredBlockTriggers>;
property triggers
readonly triggers: Readonly<TmplAstDeferredBlockTriggers>;
method visit
visit: <Result>(visitor: TmplAstVisitor<Result>) => Result;
method visitAll
visitAll: (visitor: TmplAstVisitor<unknown>) => void;
class DeferredBlockError
class TmplAstDeferredBlockError extends TmplAstBlockNode implements TmplAstNode {}
constructor
constructor( children: TmplAstNode[], nameSpan: ParseSourceSpan, sourceSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan, i18n?: I18nMeta_2);
property children
children: TmplAstNode[];
property i18n
i18n?: I18nMeta_2;
method visit
visit: <Result>(visitor: TmplAstVisitor<Result>) => Result;
class DeferredBlockLoading
class TmplAstDeferredBlockLoading extends TmplAstBlockNode implements TmplAstNode {}
constructor
constructor( children: TmplAstNode[], afterTime: number, minimumTime: number, nameSpan: ParseSourceSpan, sourceSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan, i18n?: I18nMeta_2);
property afterTime
afterTime: number;
property children
children: TmplAstNode[];
property i18n
i18n?: I18nMeta_2;
property minimumTime
minimumTime: number;
method visit
visit: <Result>(visitor: TmplAstVisitor<Result>) => Result;
class DeferredBlockPlaceholder
class TmplAstDeferredBlockPlaceholder extends TmplAstBlockNode implements TmplAstNode {}
constructor
constructor( children: TmplAstNode[], minimumTime: number, nameSpan: ParseSourceSpan, sourceSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan, i18n?: I18nMeta_2);
property children
children: TmplAstNode[];
property i18n
i18n?: I18nMeta_2;
property minimumTime
minimumTime: number;
method visit
visit: <Result>(visitor: TmplAstVisitor<Result>) => Result;
class DeferredTrigger
abstract class TmplAstDeferredTrigger implements TmplAstNode {}
constructor
constructor( nameSpan: ParseSourceSpan, sourceSpan: ParseSourceSpan, prefetchSpan: ParseSourceSpan, whenOrOnSourceSpan: ParseSourceSpan, hydrateSpan: ParseSourceSpan);
property hydrateSpan
hydrateSpan: ParseSourceSpan;
property nameSpan
nameSpan: ParseSourceSpan;
property prefetchSpan
prefetchSpan: ParseSourceSpan;
property sourceSpan
sourceSpan: ParseSourceSpan;
property whenOrOnSourceSpan
whenOrOnSourceSpan: ParseSourceSpan;
method visit
visit: <Result>(visitor: TmplAstVisitor<Result>) => Result;
class Element
class TmplAstElement implements TmplAstNode {}
constructor
constructor( name: string, attributes: TmplAstTextAttribute[], inputs: TmplAstBoundAttribute[], outputs: TmplAstBoundEvent[], children: TmplAstNode[], references: TmplAstReference[], sourceSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan, i18n?: I18nMeta_2);
property attributes
attributes: TmplAstTextAttribute[];
property children
children: TmplAstNode[];
property endSourceSpan
endSourceSpan: ParseSourceSpan;
property i18n
i18n?: I18nMeta_2;
property inputs
inputs: TmplAstBoundAttribute[];
property name
name: string;
property outputs
outputs: TmplAstBoundEvent[];
property references
references: TmplAstReference[];
property sourceSpan
sourceSpan: ParseSourceSpan;
property startSourceSpan
startSourceSpan: ParseSourceSpan;
method visit
visit: <Result>(visitor: TmplAstVisitor<Result>) => Result;
class ForLoopBlock
class TmplAstForLoopBlock extends TmplAstBlockNode implements TmplAstNode {}
constructor
constructor( item: TmplAstVariable, expression: ASTWithSource<AST>, trackBy: ASTWithSource<AST>, trackKeywordSpan: ParseSourceSpan, contextVariables: TmplAstVariable[], children: TmplAstNode[], empty: TmplAstForLoopBlockEmpty, sourceSpan: ParseSourceSpan, mainBlockSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan, nameSpan: ParseSourceSpan, i18n?: I18nMeta_2);
property children
children: TmplAstNode[];
property contextVariables
contextVariables: TmplAstVariable[];
property empty
empty: TmplAstForLoopBlockEmpty;
property expression
expression: ASTWithSource<AST>;
property i18n
i18n?: I18nMeta_2;
property item
item: TmplAstVariable;
property mainBlockSpan
mainBlockSpan: ParseSourceSpan;
property trackBy
trackBy: ASTWithSource<AST>;
property trackKeywordSpan
trackKeywordSpan: ParseSourceSpan;
method visit
visit: <Result>(visitor: TmplAstVisitor<Result>) => Result;
class ForLoopBlockEmpty
class TmplAstForLoopBlockEmpty extends TmplAstBlockNode implements TmplAstNode {}
constructor
constructor( children: TmplAstNode[], sourceSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan, nameSpan: ParseSourceSpan, i18n?: I18nMeta_2);
property children
children: TmplAstNode[];
property i18n
i18n?: I18nMeta_2;
method visit
visit: <Result>(visitor: TmplAstVisitor<Result>) => Result;
class HoverDeferredTrigger
class TmplAstHoverDeferredTrigger extends TmplAstDeferredTrigger {}
constructor
constructor( reference: string, nameSpan: ParseSourceSpan, sourceSpan: ParseSourceSpan, prefetchSpan: ParseSourceSpan, onSourceSpan: ParseSourceSpan, hydrateSpan: ParseSourceSpan);
property reference
reference: string;
class Icu
class TmplAstIcu implements TmplAstNode {}
constructor
constructor( vars: { [name: string]: TmplAstBoundText }, placeholders: { [name: string]: TmplAstBoundText | TmplAstText }, sourceSpan: ParseSourceSpan, i18n?: I18nMeta_2);
property i18n
i18n?: I18nMeta_2;
property placeholders
placeholders: { [name: string]: TmplAstBoundText | TmplAstText };
property sourceSpan
sourceSpan: ParseSourceSpan;
property vars
vars: { [name: string]: TmplAstBoundText };
method visit
visit: <Result>(visitor: TmplAstVisitor<Result>) => Result;
class IdleDeferredTrigger
class TmplAstIdleDeferredTrigger extends TmplAstDeferredTrigger {}
class IfBlock
class TmplAstIfBlock extends TmplAstBlockNode implements TmplAstNode {}
constructor
constructor( branches: TmplAstIfBlockBranch[], sourceSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan, nameSpan: ParseSourceSpan);
property branches
branches: TmplAstIfBlockBranch[];
method visit
visit: <Result>(visitor: TmplAstVisitor<Result>) => Result;
class IfBlockBranch
class TmplAstIfBlockBranch extends TmplAstBlockNode implements TmplAstNode {}
constructor
constructor( expression: AST, children: TmplAstNode[], expressionAlias: TmplAstVariable, sourceSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan, nameSpan: ParseSourceSpan, i18n?: I18nMeta_2);
property children
children: TmplAstNode[];
property expression
expression: AST;
property expressionAlias
expressionAlias: TmplAstVariable;
property i18n
i18n?: I18nMeta_2;
method visit
visit: <Result>(visitor: TmplAstVisitor<Result>) => Result;
class ImmediateDeferredTrigger
class TmplAstImmediateDeferredTrigger extends TmplAstDeferredTrigger {}
class InteractionDeferredTrigger
class TmplAstInteractionDeferredTrigger extends TmplAstDeferredTrigger {}
constructor
constructor( reference: string, nameSpan: ParseSourceSpan, sourceSpan: ParseSourceSpan, prefetchSpan: ParseSourceSpan, onSourceSpan: ParseSourceSpan, hydrateSpan: ParseSourceSpan);
property reference
reference: string;
class LetDeclaration
class TmplAstLetDeclaration implements TmplAstNode {}
constructor
constructor( name: string, value: AST, sourceSpan: ParseSourceSpan, nameSpan: ParseSourceSpan, valueSpan: ParseSourceSpan);
property name
name: string;
property nameSpan
nameSpan: ParseSourceSpan;
property sourceSpan
sourceSpan: ParseSourceSpan;
property value
value: AST;
property valueSpan
valueSpan: ParseSourceSpan;
method visit
visit: <Result>(visitor: TmplAstVisitor<Result>) => Result;
class NeverDeferredTrigger
class TmplAstNeverDeferredTrigger extends TmplAstDeferredTrigger {}
class RecursiveVisitor
class TmplAstRecursiveVisitor implements TmplAstVisitor<void> {}
method visitBoundAttribute
visitBoundAttribute: (attribute: TmplAstBoundAttribute) => void;
method visitBoundEvent
visitBoundEvent: (attribute: TmplAstBoundEvent) => void;
method visitBoundText
visitBoundText: (text: TmplAstBoundText) => void;
method visitContent
visitContent: (content: TmplAstContent) => void;
method visitDeferredBlock
visitDeferredBlock: (deferred: TmplAstDeferredBlock) => void;
method visitDeferredBlockError
visitDeferredBlockError: (block: TmplAstDeferredBlockError) => void;
method visitDeferredBlockLoading
visitDeferredBlockLoading: (block: TmplAstDeferredBlockLoading) => void;
method visitDeferredBlockPlaceholder
visitDeferredBlockPlaceholder: (block: TmplAstDeferredBlockPlaceholder) => void;
method visitDeferredTrigger
visitDeferredTrigger: (trigger: TmplAstDeferredTrigger) => void;
method visitElement
visitElement: (element: TmplAstElement) => void;
method visitForLoopBlock
visitForLoopBlock: (block: TmplAstForLoopBlock) => void;
method visitForLoopBlockEmpty
visitForLoopBlockEmpty: (block: TmplAstForLoopBlockEmpty) => void;
method visitIcu
visitIcu: (icu: TmplAstIcu) => void;
method visitIfBlock
visitIfBlock: (block: TmplAstIfBlock) => void;
method visitIfBlockBranch
visitIfBlockBranch: (block: TmplAstIfBlockBranch) => void;
method visitLetDeclaration
visitLetDeclaration: (decl: TmplAstLetDeclaration) => void;
method visitReference
visitReference: (reference: TmplAstReference) => void;
method visitSwitchBlock
visitSwitchBlock: (block: TmplAstSwitchBlock) => void;
method visitSwitchBlockCase
visitSwitchBlockCase: (block: TmplAstSwitchBlockCase) => void;
method visitTemplate
visitTemplate: (template: TmplAstTemplate) => void;
method visitText
visitText: (text: TmplAstText) => void;
method visitTextAttribute
visitTextAttribute: (attribute: TmplAstTextAttribute) => void;
method visitUnknownBlock
visitUnknownBlock: (block: TmplAstUnknownBlock) => void;
method visitVariable
visitVariable: (variable: TmplAstVariable) => void;
class Reference
class TmplAstReference implements TmplAstNode {}
constructor
constructor( name: string, value: string, sourceSpan: ParseSourceSpan, keySpan: ParseSourceSpan, valueSpan?: ParseSourceSpan);
property keySpan
readonly keySpan: ParseSourceSpan;
property name
name: string;
property sourceSpan
sourceSpan: ParseSourceSpan;
property value
value: string;
property valueSpan
valueSpan?: ParseSourceSpan;
method visit
visit: <Result>(visitor: TmplAstVisitor<Result>) => Result;
class SwitchBlock
class TmplAstSwitchBlock extends TmplAstBlockNode implements TmplAstNode {}
constructor
constructor( expression: AST, cases: TmplAstSwitchBlockCase[], unknownBlocks: TmplAstUnknownBlock[], sourceSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan, nameSpan: ParseSourceSpan);
property cases
cases: TmplAstSwitchBlockCase[];
property expression
expression: AST;
property unknownBlocks
unknownBlocks: TmplAstUnknownBlock[];
These blocks are only captured to allow for autocompletion in the language service. They aren't meant to be processed in any other way.
method visit
visit: <Result>(visitor: TmplAstVisitor<Result>) => Result;
class SwitchBlockCase
class TmplAstSwitchBlockCase extends TmplAstBlockNode implements TmplAstNode {}
constructor
constructor( expression: AST, children: TmplAstNode[], sourceSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan, nameSpan: ParseSourceSpan, i18n?: I18nMeta_2);
property children
children: TmplAstNode[];
property expression
expression: AST;
property i18n
i18n?: I18nMeta_2;
method visit
visit: <Result>(visitor: TmplAstVisitor<Result>) => Result;
class Template
class TmplAstTemplate implements TmplAstNode {}
constructor
constructor( tagName: string, attributes: TmplAstTextAttribute[], inputs: TmplAstBoundAttribute[], outputs: TmplAstBoundEvent[], templateAttrs: (TmplAstBoundAttribute | TmplAstTextAttribute)[], children: TmplAstNode[], references: TmplAstReference[], variables: TmplAstVariable[], sourceSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan, i18n?: I18nMeta_2);
property attributes
attributes: TmplAstTextAttribute[];
property children
children: TmplAstNode[];
property endSourceSpan
endSourceSpan: ParseSourceSpan;
property i18n
i18n?: I18nMeta_2;
property inputs
inputs: TmplAstBoundAttribute[];
property outputs
outputs: TmplAstBoundEvent[];
property references
references: TmplAstReference[];
property sourceSpan
sourceSpan: ParseSourceSpan;
property startSourceSpan
startSourceSpan: ParseSourceSpan;
property tagName
tagName: string;
property templateAttrs
templateAttrs: (TmplAstBoundAttribute | TmplAstTextAttribute)[];
property variables
variables: TmplAstVariable[];
method visit
visit: <Result>(visitor: TmplAstVisitor<Result>) => Result;
class Text
class TmplAstText implements TmplAstNode {}
constructor
constructor(value: string, sourceSpan: ParseSourceSpan);
property sourceSpan
sourceSpan: ParseSourceSpan;
property value
value: string;
method visit
visit: <Result>(visitor: TmplAstVisitor<Result>) => Result;
class TextAttribute
class TmplAstTextAttribute implements TmplAstNode {}
Represents a text attribute in the template.
valueSpan
may not be present in cases where there is no value<div a></div>
.keySpan
may also not be present for synthetic attributes from ICU expansions.
constructor
constructor( name: string, value: string, sourceSpan: ParseSourceSpan, keySpan: ParseSourceSpan, valueSpan?: ParseSourceSpan, i18n?: I18nMeta_2);
property i18n
i18n?: I18nMeta_2;
property keySpan
readonly keySpan: ParseSourceSpan;
property name
name: string;
property sourceSpan
sourceSpan: ParseSourceSpan;
property value
value: string;
property valueSpan
valueSpan?: ParseSourceSpan;
method visit
visit: <Result>(visitor: TmplAstVisitor<Result>) => Result;
class TimerDeferredTrigger
class TmplAstTimerDeferredTrigger extends TmplAstDeferredTrigger {}
constructor
constructor( delay: number, nameSpan: ParseSourceSpan, sourceSpan: ParseSourceSpan, prefetchSpan: ParseSourceSpan, onSourceSpan: ParseSourceSpan, hydrateSpan: ParseSourceSpan);
property delay
delay: number;
class UnknownBlock
class TmplAstUnknownBlock implements TmplAstNode {}
constructor
constructor( name: string, sourceSpan: ParseSourceSpan, nameSpan: ParseSourceSpan);
property name
name: string;
property nameSpan
nameSpan: ParseSourceSpan;
property sourceSpan
sourceSpan: ParseSourceSpan;
method visit
visit: <Result>(visitor: TmplAstVisitor<Result>) => Result;
class Variable
class TmplAstVariable implements TmplAstNode {}
constructor
constructor( name: string, value: string, sourceSpan: ParseSourceSpan, keySpan: ParseSourceSpan, valueSpan?: ParseSourceSpan);
property keySpan
readonly keySpan: ParseSourceSpan;
property name
name: string;
property sourceSpan
sourceSpan: ParseSourceSpan;
property value
value: string;
property valueSpan
valueSpan?: ParseSourceSpan;
method visit
visit: <Result>(visitor: TmplAstVisitor<Result>) => Result;
class ViewportDeferredTrigger
class TmplAstViewportDeferredTrigger extends TmplAstDeferredTrigger {}
constructor
constructor( reference: string, nameSpan: ParseSourceSpan, sourceSpan: ParseSourceSpan, prefetchSpan: ParseSourceSpan, onSourceSpan: ParseSourceSpan, hydrateSpan: ParseSourceSpan);
property reference
reference: string;
interface DeferredBlockTriggers
interface TmplAstDeferredBlockTriggers {}
property hover
hover?: TmplAstHoverDeferredTrigger;
property idle
idle?: TmplAstIdleDeferredTrigger;
property immediate
immediate?: TmplAstImmediateDeferredTrigger;
property interaction
interaction?: TmplAstInteractionDeferredTrigger;
property never
never?: TmplAstNeverDeferredTrigger;
property timer
timer?: TmplAstTimerDeferredTrigger;
property viewport
viewport?: TmplAstViewportDeferredTrigger;
property when
when?: TmplAstBoundDeferredTrigger;
interface Node
interface TmplAstNode {}
property sourceSpan
sourceSpan: ParseSourceSpan;
method visit
visit: <Result>(visitor: TmplAstVisitor<Result>) => Result;
interface Visitor
interface TmplAstVisitor<Result = any> {}
method visit
visit: (node: TmplAstNode) => Result;
method visitBoundAttribute
visitBoundAttribute: (attribute: TmplAstBoundAttribute) => Result;
method visitBoundEvent
visitBoundEvent: (attribute: TmplAstBoundEvent) => Result;
method visitBoundText
visitBoundText: (text: TmplAstBoundText) => Result;
method visitContent
visitContent: (content: TmplAstContent) => Result;
method visitDeferredBlock
visitDeferredBlock: (deferred: TmplAstDeferredBlock) => Result;
method visitDeferredBlockError
visitDeferredBlockError: (block: TmplAstDeferredBlockError) => Result;
method visitDeferredBlockLoading
visitDeferredBlockLoading: (block: TmplAstDeferredBlockLoading) => Result;
method visitDeferredBlockPlaceholder
visitDeferredBlockPlaceholder: ( block: TmplAstDeferredBlockPlaceholder) => Result;
method visitDeferredTrigger
visitDeferredTrigger: (trigger: TmplAstDeferredTrigger) => Result;
method visitElement
visitElement: (element: TmplAstElement) => Result;
method visitForLoopBlock
visitForLoopBlock: (block: TmplAstForLoopBlock) => Result;
method visitForLoopBlockEmpty
visitForLoopBlockEmpty: (block: TmplAstForLoopBlockEmpty) => Result;
method visitIcu
visitIcu: (icu: TmplAstIcu) => Result;
method visitIfBlock
visitIfBlock: (block: TmplAstIfBlock) => Result;
method visitIfBlockBranch
visitIfBlockBranch: (block: TmplAstIfBlockBranch) => Result;
method visitLetDeclaration
visitLetDeclaration: (decl: TmplAstLetDeclaration) => Result;
method visitReference
visitReference: (reference: TmplAstReference) => Result;
method visitSwitchBlock
visitSwitchBlock: (block: TmplAstSwitchBlock) => Result;
method visitSwitchBlockCase
visitSwitchBlockCase: (block: TmplAstSwitchBlockCase) => Result;
method visitTemplate
visitTemplate: (template: TmplAstTemplate) => Result;
method visitText
visitText: (text: TmplAstText) => Result;
method visitTextAttribute
visitTextAttribute: (attribute: TmplAstTextAttribute) => Result;
method visitUnknownBlock
visitUnknownBlock: (block: TmplAstUnknownBlock) => Result;
method visitVariable
visitVariable: (variable: TmplAstVariable) => Result;
Package Files (1)
Dependencies (1)
Dev Dependencies (0)
No dev dependencies.
Peer Dependencies (1)
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@angular/compiler
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@angular/compiler)
- HTML<a href="https://www.jsdocs.io/package/@angular/compiler"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 24890 ms. - Missing or incorrect documentation? Open an issue for this package.