@glimmer/syntax
- Version 0.94.9
- Published
- 1.35 MB
- 5 dependencies
- MIT license
Install
npm i @glimmer/syntax
yarn add @glimmer/syntax
pnpm add @glimmer/syntax
Overview
Overview not available.
Index
Variables
- api_AppendContent
- api_ArgReference
- api_Args
- api_Block
- api_CallExpression
- api_COMPONENT_NAMESPACE
- api_ComponentArg
- api_ElementModifier
- api_FreeVarReference
- api_GlimmerComment
- api_HELPER_NAMESPACE
- api_HTML_RESOLUTION
- api_HtmlAttr
- api_HtmlComment
- api_HtmlText
- api_InterpolateExpression
- api_InvokeBlock
- api_InvokeComponent
- api_isLiteral
- api_isStrictResolution
- api_KeywordExpression
- api_LiteralExpression
- api_loadResolution
- api_LocalVarReference
- api_LooseModeResolution
- api_MODIFIER_NAMESPACE
- api_NamedArgument
- api_NamedArguments
- api_NamedBlock
- api_NamedBlocks
- api_node
- api_PathExpression
- api_PositionalArguments
- api_SimpleElement
- api_SplatAttr
- api_STRICT_RESOLUTION
- api_Template
- api_ThisReference
- api$2_hasSpan
- api$2_loc
- api$2_maybeLoc
- api$2_NON_EXISTENT_LOCATION
- api$2_Source
- api$2_SourceOffset
- api$2_SourceSlice
- api$2_SourceSpan
- api$2_SpanList
- api$2_SYNTHETIC_LOCATION
- api$2_UNKNOWN_POSITION
- AppendContent_base
- ArgReference_base
- Args_base
- Block_base
- BROKEN
- builders
- CallExpression_base
- COMPONENT_NAMESPACE
- COMPONENT_VAR_NS
- ComponentArg_base
- ElementModifier_base
- FreeVarReference_base
- GlimmerComment_base
- HELPER_NAMESPACE
- HELPER_VAR_NS
- HTML_RESOLUTION
- HtmlAttr_base
- HtmlComment_base
- HtmlText_base
- InterpolateExpression_base
- InvokeBlock_base
- InvokeComponent_base
- KeywordExpression_base
- KEYWORDS_TYPES
- LiteralExpression_base
- LocalVarReference_base
- MODIFIER_NAMESPACE
- MODIFIER_VAR_NS
- NamedArguments_base
- NamedBlock_base
- NamedBlocks_base
- NON_EXISTENT_LOCATION
- PathExpression_base
- PositionalArguments_base
- SimpleElement_base
- SplatAttr_base
- STRICT_RESOLUTION
- SYNTHETIC_LOCATION
- Template_base
- ThisReference_base
- TraversalError
- UNKNOWN_POSITION
- visitorKeys
Functions
- buildAtName()
- buildAttr()
- buildBlock()
- buildBlockItself()
- buildCleanPath()
- buildComment()
- buildConcat()
- buildElement()
- buildElementModifier()
- buildHash()
- buildHeadFromString()
- buildLiteral()
- buildLoc()
- buildMustache()
- buildMustacheComment()
- buildPair()
- buildPath()
- buildPosition()
- buildProgram()
- buildSexpr()
- buildTemplate()
- buildText()
- buildThis()
- buildVar()
- cannotRemoveNode()
- cannotReplaceNode()
- generateSyntaxError()
- getTemplateLocals()
- getVoidTags()
- hasSpan()
- isKeyword()
- isLiteral()
- isStrictResolution()
- isVoidTag()
- loadResolution()
- loc()
- maybeLoc()
- node()
- normalize()
- preprocess()
- print()
- sortByLoc()
- traverse()
Classes
Interfaces
Type Aliases
Namespaces
AST
- AtHead
- AttrNode
- AttrPart
- AttrValue
- BaseNode
- Block
- BlockStatement
- BooleanLiteral
- CallableExpression
- CallNode
- CallParts
- CommentStatement
- CommonProgram
- ConcatStatement
- ElementModifierStatement
- ElementNode
- EntityEncodingState
- Expression
- ExpressionName
- Expressions
- Hash
- HashPair
- Literal
- LiteralName
- MinimalPathExpression
- MustacheCommentStatement
- MustacheStatement
- Node
- Nodes
- NodeType
- NullLiteral
- NumberLiteral
- ParentNode
- PathExpression
- PathHead
- Position
- Program
- SourceLocation
- SourcePosition
- Statement
- StatementName
- Statements
- StringLiteral
- StripFlags
- SubExpression
- SubNode
- SubNodes
- SubNodeType
- Template
- TextNode
- ThisHead
- TopLevelStatement
- UndefinedLiteral
- VarHead
ASTv1
- AtHead
- AttrNode
- AttrPart
- AttrValue
- BaseNode
- Block
- BlockStatement
- BooleanLiteral
- CallableExpression
- CallNode
- CallParts
- CommentStatement
- CommonProgram
- ConcatStatement
- ElementModifierStatement
- ElementNode
- EntityEncodingState
- Expression
- ExpressionName
- Expressions
- Hash
- HashPair
- Literal
- LiteralName
- MinimalPathExpression
- MustacheCommentStatement
- MustacheStatement
- Node
- Nodes
- NodeType
- NullLiteral
- NumberLiteral
- ParentNode
- PathExpression
- PathHead
- Position
- Program
- SourceLocation
- SourcePosition
- Statement
- StatementName
- Statements
- StringLiteral
- StripFlags
- SubExpression
- SubNode
- SubNodes
- SubNodeType
- Template
- TextNode
- ThisHead
- TopLevelStatement
- UndefinedLiteral
- VarHead
ASTv2
- AppendContent
- AppendContent
- ArgReference
- ArgReference
- Args
- Args
- AttrBlockNode
- AttrNode
- AttrNodeOptions
- BaseNodeFields
- Block
- Block
- CalleeNode
- CallExpression
- CallExpression
- CallFields
- CallNode
- COMPONENT_NAMESPACE
- ComponentArg
- ComponentArg
- ContentNode
- ElementModifier
- ElementModifier
- ElementNode
- ExpressionNode
- FreeVarReference
- FreeVarReference
- FreeVarResolution
- GlimmerComment
- GlimmerComment
- GlimmerParentNodeOptions
- HELPER_NAMESPACE
- HTML_RESOLUTION
- HtmlAttr
- HtmlAttr
- HtmlComment
- HtmlComment
- HtmlOrSplatAttr
- HtmlResolution
- HtmlText
- HtmlText
- InterpolateExpression
- InterpolateExpression
- InvokeBlock
- InvokeBlock
- InvokeComponent
- InvokeComponent
- isLiteral
- isStrictResolution
- KeywordExpression
- KeywordExpression
- LiteralExpression
- LiteralExpression
- LiteralTypes
- LiteralValue
- loadResolution
- LocalVarReference
- LocalVarReference
- LooseModeResolution
- LooseModeResolution
- MODIFIER_NAMESPACE
- NamedArgument
- NamedArgument
- NamedArguments
- NamedArguments
- NamedBlock
- NamedBlock
- NamedBlockFields
- NamedBlocks
- NamedBlocks
- node
- NodeConstructor
- PathExpression
- PathExpression
- PositionalArguments
- PositionalArguments
- SerializedBaseNode
- SerializedResolution
- SimpleElement
- SimpleElement
- SplatAttr
- SplatAttr
- STRICT_RESOLUTION
- StrictResolution
- StringLiteral
- Template
- Template
- ThisReference
- ThisReference
- TypedNodeConstructor
- VariableReference
Variables
variable api_AppendContent
const api_AppendContent: typeof AppendContent;
variable api_ArgReference
const api_ArgReference: typeof ArgReference;
variable api_Args
const api_Args: typeof Args;
variable api_Block
const api_Block: typeof Block;
variable api_CallExpression
const api_CallExpression: typeof CallExpression;
variable api_COMPONENT_NAMESPACE
const api_COMPONENT_NAMESPACE: string;
variable api_ComponentArg
const api_ComponentArg: typeof ComponentArg;
variable api_ElementModifier
const api_ElementModifier: typeof ElementModifier;
variable api_FreeVarReference
const api_FreeVarReference: typeof FreeVarReference;
variable api_GlimmerComment
const api_GlimmerComment: typeof GlimmerComment;
variable api_HELPER_NAMESPACE
const api_HELPER_NAMESPACE: string;
variable api_HTML_RESOLUTION
const api_HTML_RESOLUTION: { isAngleBracket: true; resolution: () => GetContextualFreeOpcode; serialize: () => SerializedResolution;};
variable api_HtmlAttr
const api_HtmlAttr: typeof HtmlAttr;
variable api_HtmlComment
const api_HtmlComment: typeof HtmlComment;
variable api_HtmlText
const api_HtmlText: typeof HtmlText;
variable api_InterpolateExpression
const api_InterpolateExpression: typeof InterpolateExpression;
variable api_InvokeBlock
const api_InvokeBlock: typeof InvokeBlock;
variable api_InvokeComponent
const api_InvokeComponent: typeof InvokeComponent;
variable api_isLiteral
const api_isLiteral: <K extends keyof LiteralTypes = keyof LiteralTypes>( node: ExpressionNode, kind?: K) => node is StringLiteral;
variable api_isStrictResolution
const api_isStrictResolution: ( value: unknown) => value is { resolution: () => GetContextualFreeOpcode; serialize: () => SerializedResolution; isAngleBracket: false;};
variable api_KeywordExpression
const api_KeywordExpression: typeof KeywordExpression;
variable api_LiteralExpression
const api_LiteralExpression: typeof LiteralExpression;
variable api_loadResolution
const api_loadResolution: (resolution: SerializedResolution) => FreeVarResolution;
variable api_LocalVarReference
const api_LocalVarReference: typeof LocalVarReference;
variable api_LooseModeResolution
const api_LooseModeResolution: typeof LooseModeResolution;
variable api_MODIFIER_NAMESPACE
const api_MODIFIER_NAMESPACE: string;
variable api_NamedArgument
const api_NamedArgument: typeof NamedArgument;
variable api_NamedArguments
const api_NamedArguments: typeof NamedArguments;
variable api_NamedBlock
const api_NamedBlock: typeof NamedBlock;
variable api_NamedBlocks
const api_NamedBlocks: typeof NamedBlocks;
variable api_node
const api_node: { (): { fields<Fields extends object>(): NodeConstructor<Fields & BaseNodeFields>; }; <T extends string>(name: T): { fields<Fields extends object>(): TypedNodeConstructor< T, Fields & BaseNodeFields >; };};
variable api_PathExpression
const api_PathExpression: typeof PathExpression;
variable api_PositionalArguments
const api_PositionalArguments: typeof PositionalArguments;
variable api_SimpleElement
const api_SimpleElement: typeof SimpleElement;
variable api_SplatAttr
const api_SplatAttr: typeof SplatAttr;
variable api_STRICT_RESOLUTION
const api_STRICT_RESOLUTION: { resolution: () => GetContextualFreeOpcode; serialize: () => SerializedResolution; isAngleBracket: false;};
variable api_Template
const api_Template: typeof Template;
variable api_ThisReference
const api_ThisReference: typeof ThisReference;
variable api$2_hasSpan
const api$2_hasSpan: (span: MaybeHasSourceSpan) => span is HasSourceSpan;
variable api$2_loc
const api$2_loc: (span: HasSourceSpan) => SourceSpan;
variable api$2_maybeLoc
const api$2_maybeLoc: ( location: MaybeHasSourceSpan, fallback: SourceSpan) => SourceSpan;
variable api$2_NON_EXISTENT_LOCATION
const api$2_NON_EXISTENT_LOCATION: Readonly<{ readonly source: '(nonexistent)'; readonly start: Readonly<{ readonly line: 1; readonly column: 0 }>; readonly end: Readonly<{ readonly line: 1; readonly column: 0 }>;}>;
variable api$2_Source
const api$2_Source: typeof Source;
variable api$2_SourceOffset
const api$2_SourceOffset: typeof SourceOffset;
variable api$2_SourceSlice
const api$2_SourceSlice: typeof SourceSlice;
variable api$2_SourceSpan
const api$2_SourceSpan: typeof SourceSpan;
variable api$2_SpanList
const api$2_SpanList: typeof SpanList;
variable api$2_SYNTHETIC_LOCATION
const api$2_SYNTHETIC_LOCATION: Readonly<{ readonly source: '(synthetic)'; readonly start: Readonly<{ readonly line: 1; readonly column: 0 }>; readonly end: Readonly<{ readonly line: 1; readonly column: 0 }>;}>;
variable api$2_UNKNOWN_POSITION
const api$2_UNKNOWN_POSITION: Readonly<{ readonly line: 1; readonly column: 0 }>;
variable AppendContent_base
const AppendContent_base: TypedNodeConstructor< 'AppendContent', { value: ExpressionNode; trusting: boolean; table: SymbolTable } & BaseNodeFields>;
variable ArgReference_base
const ArgReference_base: TypedNodeConstructor< 'Arg', { name: SourceSlice; symbol: number } & BaseNodeFields>;
variable Args_base
const Args_base: NodeConstructor< { positional: PositionalArguments; named: NamedArguments } & BaseNodeFields>;
variable Block_base
const Block_base: NodeConstructor< { scope: BlockSymbolTable } & GlimmerParentNodeOptions & BaseNodeFields>;
variable BROKEN
const BROKEN: string;
Used to indicate that an attempt to convert a
SourcePosition
to a character offset failed. It is separate fromnull
so thatnull
can be used to indicate that the computation wasn't yet attempted (and therefore to cache the failure)
variable builders
const builders: { mustache: typeof buildMustache; block: typeof buildBlock; comment: typeof buildComment; mustacheComment: typeof buildMustacheComment; element: typeof buildElement; elementModifier: typeof buildElementModifier; attr: typeof buildAttr; text: typeof buildText; sexpr: typeof buildSexpr; concat: typeof buildConcat; hash: typeof buildHash; pair: typeof buildPair; literal: typeof buildLiteral; program: typeof buildProgram; blockItself: typeof buildBlockItself; template: typeof buildTemplate; loc: typeof buildLoc; pos: typeof buildPosition; path: typeof buildPath; fullPath: typeof buildCleanPath; head: typeof buildHeadFromString; at: typeof buildAtName; var: typeof buildVar; this: typeof buildThis; string: (value: string) => StringLiteral$1; boolean: (value: boolean) => BooleanLiteral; number: (value: number) => NumberLiteral; undefined(): UndefinedLiteral; null(): NullLiteral;};
variable CallExpression_base
const CallExpression_base: TypedNodeConstructor<'Call', CallFields & BaseNodeFields>;
variable COMPONENT_NAMESPACE
const COMPONENT_NAMESPACE: string;
variable COMPONENT_VAR_NS
const COMPONENT_VAR_NS: string;
variable ComponentArg_base
const ComponentArg_base: NodeConstructor<AttrNodeOptions & BaseNodeFields>;
variable ElementModifier_base
const ElementModifier_base: TypedNodeConstructor< 'ElementModifier', CallFields & BaseNodeFields>;
variable FreeVarReference_base
const FreeVarReference_base: TypedNodeConstructor< 'Free', { name: string; resolution: FreeVarResolution; symbol: number } & BaseNodeFields>;
variable GlimmerComment_base
const GlimmerComment_base: TypedNodeConstructor< 'GlimmerComment', { text: SourceSlice } & BaseNodeFields>;
variable HELPER_NAMESPACE
const HELPER_NAMESPACE: string;
variable HELPER_VAR_NS
const HELPER_VAR_NS: string;
variable HTML_RESOLUTION
const HTML_RESOLUTION: { isAngleBracket: true; resolution: () => GetContextualFreeOpcode; serialize: () => SerializedResolution;};
variable HtmlAttr_base
const HtmlAttr_base: TypedNodeConstructor< 'HtmlAttr', AttrNodeOptions & BaseNodeFields>;
variable HtmlComment_base
const HtmlComment_base: TypedNodeConstructor< 'HtmlComment', { text: SourceSlice } & BaseNodeFields>;
variable HtmlText_base
const HtmlText_base: TypedNodeConstructor< 'HtmlText', { chars: string } & BaseNodeFields>;
variable InterpolateExpression_base
const InterpolateExpression_base: TypedNodeConstructor< 'Interpolate', { parts: PresentArray<ExpressionNode> } & BaseNodeFields>;
variable InvokeBlock_base
const InvokeBlock_base: TypedNodeConstructor< 'InvokeBlock', CallFields & { blocks: NamedBlocks } & BaseNodeFields>;
variable InvokeComponent_base
const InvokeComponent_base: TypedNodeConstructor< 'InvokeComponent', InvokeComponentFields & BaseNodeFields>;
variable KeywordExpression_base
const KeywordExpression_base: TypedNodeConstructor< 'Keyword', { name: string; symbol: number } & BaseNodeFields>;
variable KEYWORDS_TYPES
const KEYWORDS_TYPES: { action: ('Call' | 'Modifier')[]; component: ('Block' | 'Call' | 'Append')[]; debugger: 'Append'[]; 'each-in': 'Block'[]; each: 'Block'[]; 'has-block-params': ('Call' | 'Append')[]; 'has-block': ('Call' | 'Append')[]; helper: ('Call' | 'Append')[]; if: ('Block' | 'Call' | 'Append')[]; 'in-element': 'Block'[]; let: 'Block'[]; log: ('Call' | 'Append')[]; modifier: ('Call' | 'Modifier')[]; mount: 'Append'[]; mut: ('Call' | 'Append')[]; outlet: 'Append'[]; readonly: ('Call' | 'Append')[]; unbound: ('Call' | 'Append')[]; unless: ('Block' | 'Call' | 'Append')[]; yield: 'Append'[];};
This includes the full list of keywords currently in use in the template language, and where their valid usages are.
variable LiteralExpression_base
const LiteralExpression_base: TypedNodeConstructor< 'Literal', { value: LiteralValue } & BaseNodeFields>;
variable LocalVarReference_base
const LocalVarReference_base: TypedNodeConstructor< 'Local', { name: string; isTemplateLocal: boolean; symbol: number } & BaseNodeFields>;
variable MODIFIER_NAMESPACE
const MODIFIER_NAMESPACE: string;
variable MODIFIER_VAR_NS
const MODIFIER_VAR_NS: string;
variable NamedArguments_base
const NamedArguments_base: NodeConstructor< { entries: readonly NamedArgument[] } & BaseNodeFields>;
variable NamedBlock_base
const NamedBlock_base: NodeConstructor<NamedBlockFields & BaseNodeFields>;
variable NamedBlocks_base
const NamedBlocks_base: NodeConstructor< { blocks: readonly NamedBlock[] } & BaseNodeFields>;
variable NON_EXISTENT_LOCATION
const NON_EXISTENT_LOCATION: Readonly<{ readonly source: '(nonexistent)'; readonly start: Readonly<{ readonly line: 1; readonly column: 0 }>; readonly end: Readonly<{ readonly line: 1; readonly column: 0 }>;}>;
variable PathExpression_base
const PathExpression_base: TypedNodeConstructor< 'Path', { ref: VariableReference; tail: readonly SourceSlice[] } & BaseNodeFields>;
variable PositionalArguments_base
const PositionalArguments_base: NodeConstructor< { exprs: readonly ExpressionNode[] } & BaseNodeFields>;
variable SimpleElement_base
const SimpleElement_base: TypedNodeConstructor< 'SimpleElement', SimpleElementOptions & BaseNodeFields>;
variable SplatAttr_base
const SplatAttr_base: TypedNodeConstructor< 'SplatAttr', { symbol: number } & BaseNodeFields>;
variable STRICT_RESOLUTION
const STRICT_RESOLUTION: { resolution: () => GetContextualFreeOpcode; serialize: () => SerializedResolution; isAngleBracket: false;};
Strict resolution is used:
1. in a strict mode template 2. in an local variable invocation with dot paths
variable SYNTHETIC_LOCATION
const SYNTHETIC_LOCATION: Readonly<{ readonly source: '(synthetic)'; readonly start: Readonly<{ readonly line: 1; readonly column: 0 }>; readonly end: Readonly<{ readonly line: 1; readonly column: 0 }>;}>;
variable Template_base
const Template_base: NodeConstructor< { table: ProgramSymbolTable } & GlimmerParentNodeOptions & BaseNodeFields>;
variable ThisReference_base
const ThisReference_base: TypedNodeConstructor<'This', object & BaseNodeFields>;
variable TraversalError
const TraversalError: TraversalErrorConstructor;
variable UNKNOWN_POSITION
const UNKNOWN_POSITION: Readonly<{ readonly line: 1; readonly column: 0 }>;
variable visitorKeys
const visitorKeys: { readonly Template: readonly ['body']; readonly Block: readonly ['body']; readonly MustacheStatement: readonly ['path', 'params', 'hash']; readonly BlockStatement: readonly [ 'path', 'params', 'hash', 'program', 'inverse' ]; readonly ElementModifierStatement: readonly ['path', 'params', 'hash']; readonly CommentStatement: readonly []; readonly MustacheCommentStatement: readonly []; readonly ElementNode: readonly [ 'attributes', 'modifiers', 'children', 'comments' ]; readonly AttrNode: readonly ['value']; readonly TextNode: readonly []; readonly ConcatStatement: readonly ['parts']; readonly SubExpression: readonly ['path', 'params', 'hash']; readonly PathExpression: readonly []; readonly StringLiteral: readonly []; readonly BooleanLiteral: readonly []; readonly NumberLiteral: readonly []; readonly NullLiteral: readonly []; readonly UndefinedLiteral: readonly []; readonly Hash: readonly ['pairs']; readonly HashPair: readonly ['value'];};
Functions
function buildAtName
buildAtName: (name: string, loc?: SourceLocation) => AtHead;
function buildAttr
buildAttr: (name: string, value: AttrValue, loc?: SourceLocation) => AttrNode$1;
function buildBlock
buildBlock: ( path: BuilderHead, params: Nullable<Expression[]>, hash: Nullable<Hash>, _defaultBlock: PossiblyDeprecatedBlock, _elseBlock?: Nullable<PossiblyDeprecatedBlock>, loc?: SourceLocation, openStrip?: StripFlags, inverseStrip?: StripFlags, closeStrip?: StripFlags) => BlockStatement;
function buildBlockItself
buildBlockItself: ( body?: Statement[], params?: Array<VarHead | string>, chained?: boolean, loc?: SourceLocation) => Block$1;
function buildCleanPath
buildCleanPath: ( head: PathHead, tail?: string[], loc?: SourceLocation) => PathExpression$1;
function buildComment
buildComment: (value: string, loc?: SourceLocation) => CommentStatement;
function buildConcat
buildConcat: ( parts: (TextNode | MustacheStatement)[], loc?: SourceLocation) => ConcatStatement;
function buildElement
buildElement: ( tag: TagDescriptor, options?: BuildElementOptions) => ElementNode$1;
function buildElementModifier
buildElementModifier: ( path: BuilderHead, params?: Expression[], hash?: Hash, loc?: Nullable<SourceLocation>) => ElementModifierStatement;
function buildHash
buildHash: (pairs?: HashPair[], loc?: SourceLocation) => Hash;
function buildHeadFromString
buildHeadFromString: (original: string, loc?: SourceLocation) => PathHead;
function buildLiteral
buildLiteral: <T extends Literal>( type: T['type'], value: T['value'], loc?: SourceLocation) => T;
function buildLoc
buildLoc: { (loc: Nullable<SourceLocation>): SourceSpan; ( startLine: number, startColumn: number, endLine?: number, endColumn?: number, source?: string ): SourceSpan;};
function buildMustache
buildMustache: ( path: BuilderHead | Literal, params?: Expression[], hash?: Hash, trusting?: boolean, loc?: SourceLocation, strip?: StripFlags) => MustacheStatement;
function buildMustacheComment
buildMustacheComment: ( value: string, loc?: SourceLocation) => MustacheCommentStatement;
function buildPair
buildPair: (key: string, value: Expression, loc?: SourceLocation) => HashPair;
function buildPath
buildPath: { ( path: PathExpression$1 | string | { head: string; tail: string[] }, loc?: SourceLocation ): PathExpression$1; (path: BuilderHead, loc?: SourceLocation): CallableExpression; ( path: | string | PathExpression$1 | StringLiteral$1 | SubExpression | BooleanLiteral | NumberLiteral | NullLiteral | UndefinedLiteral, loc?: SourceLocation ): Expression;};
function buildPosition
buildPosition: (line: number, column: number) => SourcePosition;
function buildProgram
buildProgram: ( body?: Statement[], blockParams?: string[], loc?: SourceLocation) => Template$1 | Block$1;
function buildSexpr
buildSexpr: ( path: BuilderHead, params?: Expression[], hash?: Hash, loc?: SourceLocation) => SubExpression;
function buildTemplate
buildTemplate: ( body?: Statement[], blockParams?: string[], loc?: SourceLocation) => Template$1;
function buildText
buildText: (chars?: string, loc?: SourceLocation) => TextNode;
function buildThis
buildThis: (loc?: SourceLocation) => ThisHead;
function buildVar
buildVar: (name: string, loc?: SourceLocation) => VarHead;
function cannotRemoveNode
cannotRemoveNode: (node: Node, parent: Node, key: string) => TraversalError;
function cannotReplaceNode
cannotReplaceNode: (node: Node, parent: Node, key: string) => TraversalError;
function generateSyntaxError
generateSyntaxError: ( message: string, location: SourceSpan) => GlimmerSyntaxError;
function getTemplateLocals
getTemplateLocals: ( html: string, options?: GetTemplateLocalsOptions) => string[];
Parses and traverses a given handlebars html template to extract all template locals referenced that could possible come from the parent scope. Can exclude known keywords optionally.
function getVoidTags
getVoidTags: () => string[];
function hasSpan
hasSpan: (span: MaybeHasSourceSpan) => span is HasSourceSpan;
function isKeyword
isKeyword: { (word: string): word is | 'action' | 'component' | 'debugger' | 'each-in' | 'each' | 'has-block-params' | 'has-block' | 'helper' | 'if' | 'in-element' | 'let' | 'log' | 'modifier' | 'mount' | 'mut' | 'outlet' | 'readonly' | 'unbound' | 'unless' | 'yield'; (word: string, type: KeywordType): boolean;};
function isLiteral
isLiteral: <K extends keyof LiteralTypes = keyof LiteralTypes>( node: ExpressionNode, kind?: K) => node is StringLiteral;
Returns true if an input is a literal.
function isStrictResolution
isStrictResolution: ( value: unknown) => value is { resolution: () => GetContextualFreeOpcode; serialize: () => SerializedResolution; isAngleBracket: false;};
function isVoidTag
isVoidTag: (tag: string) => boolean;
Examples when true: - link - liNK
Examples when false: - Link (component)
function loadResolution
loadResolution: (resolution: SerializedResolution) => FreeVarResolution;
function loc
loc: (span: HasSourceSpan) => SourceSpan;
function maybeLoc
maybeLoc: (location: MaybeHasSourceSpan, fallback: SourceSpan) => SourceSpan;
function node
node: { (): { fields<Fields extends object>(): NodeConstructor<Fields & BaseNodeFields>; }; <T extends string>(name: T): { fields<Fields extends object>(): TypedNodeConstructor< T, Fields & BaseNodeFields >; };};
This is a convenience function for creating ASTv2 nodes, with an optional name and the node's options.
export class HtmlText extends node('HtmlText').fields<{ chars: string }>() {}This creates a new ASTv2 node with the name
'HtmlText'
and one fieldchars: string
(in addition to aloc: SourceOffsets
field, which all nodes have).export class Args extends node().fields<{positional: PositionalArguments;named: NamedArguments}>() {}This creates a new un-named ASTv2 node with two fields (
positional: Positional
and `named: Named, in addition to the generic
loc: SourceOffsets` field).Once you create a node using
node
, it is instantiated with all of its fields (includingloc
):new HtmlText({ loc: offsets, chars: someString });
function normalize
normalize: ( source: Source, options?: PrecompileOptionsWithLexicalScope) => [ast: Template, locals: string[]];
function preprocess
preprocess: ( input: string | Source | Program$1, options?: PreprocessOptions) => Template$1;
function print
print: (ast: Node, options?: PrinterOptions) => string;
function sortByLoc
sortByLoc: (a: Node, b: Node) => -1 | 0 | 1;
function traverse
traverse: (node: Node, visitor: NodeVisitor) => void;
Classes
class BlockSymbolTable
class BlockSymbolTable extends SymbolTable {}
constructor
constructor(parent: SymbolTable, symbols: string[], slots: number[]);
property locals
readonly locals: string[];
property slots
slots: number[];
property symbols
symbols: string[];
method allocate
allocate: (identifier: string) => number;
method allocateBlock
allocateBlock: (name: string) => number;
method allocateFree
allocateFree: (name: string, resolution: FreeVarResolution) => number;
method allocateNamed
allocateNamed: (name: string) => number;
method get
get: (name: string) => [number, boolean];
method getDebugInfo
getDebugInfo: () => [ locals: Record<string, number>, upvars: Record<string, number>];
method getKeyword
getKeyword: (name: string) => number;
method getLocalsMap
getLocalsMap: () => Dict<number>;
method has
has: (name: string) => boolean;
method hasKeyword
hasKeyword: (name: string) => boolean;
method hasLexical
hasLexical: (name: string) => boolean;
method root
root: () => ProgramSymbolTable;
class Path
class Walker {}
constructor
constructor(order?: {});
property order
order?: {};
property stack
stack: unknown[];
method children
children: <N extends Node>( node: N & Node, callback: NodeCallback<N & Node>) => void;
method visit
visit: <N extends Node>(node: Nullable<N>, visitor: NodeCallback<N>) => void;
class ProgramSymbolTable
class ProgramSymbolTable extends SymbolTable {}
constructor
constructor( templateLocals: readonly string[], keywords: readonly string[], options: SymbolTableOptions);
property blocks
readonly blocks: Dict<number>;
property named
readonly named: Dict<number>;
property symbols
readonly symbols: string[];
property upvars
readonly upvars: string[];
property usedTemplateLocals
readonly usedTemplateLocals: string[];
method allocate
allocate: (identifier: string) => number;
method allocateBlock
allocateBlock: (name: string) => number;
method allocateFree
allocateFree: (name: string, resolution: FreeVarResolution) => number;
method allocateNamed
allocateNamed: (name: string) => number;
method get
get: (name: string) => [number, boolean];
method getDebugInfo
getDebugInfo: () => Core.DebugSymbols;
method getKeyword
getKeyword: (name: string) => number;
method getLocalsMap
getLocalsMap: () => Dict<number>;
method getUsedTemplateLocals
getUsedTemplateLocals: () => string[];
method has
has: (name: string) => boolean;
method hasKeyword
hasKeyword: (name: string) => boolean;
method hasLexical
hasLexical: (name: string) => boolean;
method root
root: () => this;
class SourceSlice
class SourceSlice<Chars extends string = string> {}
constructor
constructor(options: { loc: SourceSpan; chars: Chars });
property chars
readonly chars: string;
property loc
readonly loc: SourceSpan;
method getString
getString: () => string;
method load
static load: ( source: Source, slice: SerializedSourceSlice<string>) => SourceSlice;
method serialize
serialize: () => SerializedSourceSlice<Chars>;
method synthetic
static synthetic: <S extends string>(chars: S) => SourceSlice<S>;
class SpanList
class SpanList {}
constructor
constructor(span?: SourceSpan[]);
method add
add: (offset: SourceSpan) => void;
method getRangeOffset
getRangeOffset: (fallback: SourceSpan) => SourceSpan;
method range
static range: { (span: PresentArray<HasSourceSpan>): SourceSpan; (span: HasSourceSpan[], fallback: SourceSpan): SourceSpan;};
class SymbolTable
abstract class SymbolTable {}
method allocate
abstract allocate: (identifier: string) => number;
method allocateBlock
abstract allocateBlock: (name: string) => number;
method allocateFree
abstract allocateFree: (name: string, resolution: FreeVarResolution) => number;
method allocateNamed
abstract allocateNamed: (name: string) => number;
method child
child: (locals: string[]) => BlockSymbolTable;
method get
abstract get: (name: string) => [symbol: number, isRoot: boolean];
method getDebugInfo
abstract getDebugInfo: () => Core.DebugSymbols;
method getKeyword
abstract getKeyword: (name: string) => number;
method getLocalsMap
abstract getLocalsMap: () => Dict<number>;
method has
abstract has: (name: string) => boolean;
method hasKeyword
abstract hasKeyword: (name: string) => boolean;
method hasLexical
abstract hasLexical: (name: string) => boolean;
method root
abstract root: () => ProgramSymbolTable;
method top
static top: ( locals: readonly string[], keywords: readonly string[], options: SymbolTableOptions) => ProgramSymbolTable;
class Walker
class Walker {}
constructor
constructor(order?: {});
property order
order?: {};
property stack
stack: unknown[];
method children
children: <N extends Node>( node: N & Node, callback: NodeCallback<N & Node>) => void;
method visit
visit: <N extends Node>(node: Nullable<N>, visitor: NodeCallback<N>) => void;
class WalkerPath
class WalkerPath<N extends Node> {}
constructor
constructor(node: Node, parent?: WalkerPath<Node>, parentKey?: string);
property node
node: Node;
property parent
parent: WalkerPath<Node>;
property parentKey
parentKey: string;
property parentNode
readonly parentNode: Node;
method parents
parents: () => Iterable<WalkerPath<Node> | null>;
Interfaces
interface ASTPlugin
interface ASTPlugin {}
interface ASTPluginBuilder
interface ASTPluginBuilder< TEnv extends ASTPluginEnvironment = ASTPluginEnvironment> {}
ASTPlugins can make changes to the Glimmer template AST before compilation begins.
call signature
(env: TEnv): ASTPlugin;
interface ASTPluginEnvironment
interface ASTPluginEnvironment {}
interface GlimmerSyntaxError
interface GlimmerSyntaxError extends Error {}
interface PrecompileOptions
interface PrecompileOptions extends PreprocessOptions {}
property customizeComponentName
customizeComponentName?: ((input: string) => string) | undefined;
In loose mode, this hook allows embedding environments to customize the name of an angle-bracket component. In practice, this means that
<HelloWorld />
in Ember is compiled by Glimmer as an invocation of a component namedhello-world
.It's a little weird that this is needed in addition to the resolver, but it's a classic-only feature and it seems fine to leave it alone for classic consumers.
property id
id?: TemplateIdFn;
property keywords
keywords?: readonly string[];
Additional non-native keywords.
Local variables (block params or lexical scope) always takes precedence, but otherwise, suitable free variable candidates (e.g. those are not part of a path) are matched against this list and turned into keywords.
In strict mode compilation, keywords suppresses the undefined reference error and will be resolved by the runtime environment.
In loose mode, keywords are currently ignored and since all free variables are already resolved by the runtime environment.
interface PrecompileOptionsWithLexicalScope
interface PrecompileOptionsWithLexicalScope extends PrecompileOptions {}
property emit
emit?: | { debugSymbols?: boolean; } | undefined;
If
emit.debugSymbols
is set totrue
, the name of lexical local variables will be included in the wire format.
property lexicalScope
lexicalScope: (variable: string) => boolean;
interface PreprocessOptions
interface PreprocessOptions {}
property customizeComponentName
customizeComponentName?: ((input: string) => string) | undefined;
property locals
locals?: string[] | undefined;
property meta
meta?: | { moduleName?: string | undefined; } | undefined;
property mode
mode?: 'codemod' | 'precompile' | undefined;
Useful for specifying a group of options together.
When
'codemod'
we disable all whitespace control in handlebars (to preserve as much as possible) and we also avoid any escaping/unescaping of HTML entity codes.
property parseOptions
parseOptions?: HandlebarsParseOptions | undefined;
property plugins
plugins?: | { ast?: ASTPluginBuilder[] | undefined; } | undefined;
property strictMode
strictMode?: boolean | undefined;
interface Syntax
interface Syntax {}
interface TemplateIdFn
interface TemplateIdFn {}
call signature
(src: string): Nullable<string>;
Type Aliases
type HasSourceSpan
type HasSourceSpan = | { loc: SourceSpan; } | SourceSpan | [HasSourceSpan, ...HasSourceSpan[]];
type KeywordType
type KeywordType = 'Call' | 'Modifier' | 'Append' | 'Block';
type MaybeHasSourceSpan
type MaybeHasSourceSpan = | { loc: SourceSpan; } | SourceSpan | MaybeHasSourceSpan[];
type NodeVisitor
type NodeVisitor = { [P in keyof Nodes]?: NodeTraversal<Nodes[P]>;} & { All?: NodeTraversal<Node>; /** * @deprecated use Template or Block instead */ Program?: NodeTraversal<Template$1 | Block$1>;};
Namespaces
namespace AST
namespace AST {}
interface AttrNode
interface AttrNode$1 extends BaseNode {}
interface Block
interface Block$1 extends CommonProgram {}
property blockParams
blockParams: string[];
string accessor for params.name
property chained
chained?: boolean;
property params
params: VarHead[];
property type
type: 'Block';
interface ElementNode
interface ElementNode$1 extends BaseNode {}
property attributes
attributes: AttrNode$1[];
property blockParams
blockParams: string[];
string accessor for params.name
property children
children: Statement[];
property closeTag
closeTag: Nullable<SourceSpan>;
span for the close tag, null for void or self-closing tags
property comments
comments: MustacheCommentStatement[];
property modifiers
modifiers: ElementModifierStatement[];
property openTag
openTag: SourceSpan;
span for the open tag
property params
params: VarHead[];
property path
path: PathExpression$1;
property selfClosing
selfClosing: boolean;
property tag
tag: string;
string accessor for path.original
property type
type: 'ElementNode';
interface PathExpression
interface PathExpression$1 extends MinimalPathExpression {}
property data
readonly data: boolean;
Deprecated
use `head.type' instead
property head
head: PathHead;
property original
original: string;
property parts
parts: readonly string[];
Deprecated
use
head
andtail
instead
property tail
tail: string[];
property this
readonly this: boolean;
Deprecated
use
head.type
instead
property type
type: 'PathExpression';
interface Position
interface SourcePosition {}
interface StringLiteral
interface StringLiteral$1 extends BaseNode {}
interface Template
interface Template$1 extends CommonProgram {}
property blockParams
blockParams: string[];
property type
type: 'Template';
type AtHead
type api$1_AtHead = AtHead;
type AttrPart
type api$1_AttrPart = AttrPart;
type AttrValue
type api$1_AttrValue = AttrValue;
type BaseNode
type api$1_BaseNode = BaseNode;
type BlockStatement
type api$1_BlockStatement = BlockStatement;
type BooleanLiteral
type api$1_BooleanLiteral = BooleanLiteral;
type CallableExpression
type api$1_CallableExpression = CallableExpression;
type CallNode
type CallNode$1 = | MustacheStatement | BlockStatement | ElementModifierStatement | SubExpression;
type CallParts
type api$1_CallParts = CallParts;
type CommentStatement
type api$1_CommentStatement = CommentStatement;
type CommonProgram
type api$1_CommonProgram = CommonProgram;
type ConcatStatement
type api$1_ConcatStatement = ConcatStatement;
type ElementModifierStatement
type api$1_ElementModifierStatement = ElementModifierStatement;
type EntityEncodingState
type api$1_EntityEncodingState = EntityEncodingState;
type Expression
type api$1_Expression = Expression;
type ExpressionName
type api$1_ExpressionName = ExpressionName;
type Expressions
type api$1_Expressions = Expressions;
type Hash
type api$1_Hash = Hash;
type HashPair
type api$1_HashPair = HashPair;
type Literal
type api$1_Literal = Literal;
type LiteralName
type api$1_LiteralName = LiteralName;
type MinimalPathExpression
type api$1_MinimalPathExpression = MinimalPathExpression;
type MustacheCommentStatement
type api$1_MustacheCommentStatement = MustacheCommentStatement;
type MustacheStatement
type api$1_MustacheStatement = MustacheStatement;
type Node
type api$1_Node = Node;
type Nodes
type api$1_Nodes = Nodes;
type NodeType
type api$1_NodeType = NodeType;
type NullLiteral
type api$1_NullLiteral = NullLiteral;
type NumberLiteral
type api$1_NumberLiteral = NumberLiteral;
type ParentNode
type api$1_ParentNode = ParentNode;
type PathHead
type api$1_PathHead = PathHead;
type Program
type api$1_Program = Program;
type SourceLocation
type api$1_SourceLocation = SourceLocation;
type SourcePosition
type api$1_SourcePosition = SourcePosition;
type Statement
type api$1_Statement = Statement;
type StatementName
type api$1_StatementName = StatementName;
type Statements
type api$1_Statements = Statements;
type StripFlags
type api$1_StripFlags = StripFlags;
type SubExpression
type api$1_SubExpression = SubExpression;
type SubNode
type api$1_SubNode = SubNode;
type SubNodes
type api$1_SubNodes = SubNodes;
type SubNodeType
type api$1_SubNodeType = SubNodeType;
type TextNode
type api$1_TextNode = TextNode;
type ThisHead
type api$1_ThisHead = ThisHead;
type TopLevelStatement
type api$1_TopLevelStatement = TopLevelStatement;
type UndefinedLiteral
type api$1_UndefinedLiteral = UndefinedLiteral;
type VarHead
type api$1_VarHead = VarHead;
namespace ASTv1
namespace ASTv1 {}
interface AttrNode
interface AttrNode$1 extends BaseNode {}
interface Block
interface Block$1 extends CommonProgram {}
property blockParams
blockParams: string[];
string accessor for params.name
property chained
chained?: boolean;
property params
params: VarHead[];
property type
type: 'Block';
interface ElementNode
interface ElementNode$1 extends BaseNode {}
property attributes
attributes: AttrNode$1[];
property blockParams
blockParams: string[];
string accessor for params.name
property children
children: Statement[];
property closeTag
closeTag: Nullable<SourceSpan>;
span for the close tag, null for void or self-closing tags
property comments
comments: MustacheCommentStatement[];
property modifiers
modifiers: ElementModifierStatement[];
property openTag
openTag: SourceSpan;
span for the open tag
property params
params: VarHead[];
property path
path: PathExpression$1;
property selfClosing
selfClosing: boolean;
property tag
tag: string;
string accessor for path.original
property type
type: 'ElementNode';
interface PathExpression
interface PathExpression$1 extends MinimalPathExpression {}
property data
readonly data: boolean;
Deprecated
use `head.type' instead
property head
head: PathHead;
property original
original: string;
property parts
parts: readonly string[];
Deprecated
use
head
andtail
instead
property tail
tail: string[];
property this
readonly this: boolean;
Deprecated
use
head.type
instead
property type
type: 'PathExpression';
interface Position
interface SourcePosition {}
interface StringLiteral
interface StringLiteral$1 extends BaseNode {}
interface Template
interface Template$1 extends CommonProgram {}
property blockParams
blockParams: string[];
property type
type: 'Template';
type AtHead
type api$1_AtHead = AtHead;
type AttrPart
type api$1_AttrPart = AttrPart;
type AttrValue
type api$1_AttrValue = AttrValue;
type BaseNode
type api$1_BaseNode = BaseNode;
type BlockStatement
type api$1_BlockStatement = BlockStatement;
type BooleanLiteral
type api$1_BooleanLiteral = BooleanLiteral;
type CallableExpression
type api$1_CallableExpression = CallableExpression;
type CallNode
type CallNode$1 = | MustacheStatement | BlockStatement | ElementModifierStatement | SubExpression;
type CallParts
type api$1_CallParts = CallParts;
type CommentStatement
type api$1_CommentStatement = CommentStatement;
type CommonProgram
type api$1_CommonProgram = CommonProgram;
type ConcatStatement
type api$1_ConcatStatement = ConcatStatement;
type ElementModifierStatement
type api$1_ElementModifierStatement = ElementModifierStatement;
type EntityEncodingState
type api$1_EntityEncodingState = EntityEncodingState;
type Expression
type api$1_Expression = Expression;
type ExpressionName
type api$1_ExpressionName = ExpressionName;
type Expressions
type api$1_Expressions = Expressions;
type Hash
type api$1_Hash = Hash;
type HashPair
type api$1_HashPair = HashPair;
type Literal
type api$1_Literal = Literal;
type LiteralName
type api$1_LiteralName = LiteralName;
type MinimalPathExpression
type api$1_MinimalPathExpression = MinimalPathExpression;
type MustacheCommentStatement
type api$1_MustacheCommentStatement = MustacheCommentStatement;
type MustacheStatement
type api$1_MustacheStatement = MustacheStatement;
type Node
type api$1_Node = Node;
type Nodes
type api$1_Nodes = Nodes;
type NodeType
type api$1_NodeType = NodeType;
type NullLiteral
type api$1_NullLiteral = NullLiteral;
type NumberLiteral
type api$1_NumberLiteral = NumberLiteral;
type ParentNode
type api$1_ParentNode = ParentNode;
type PathHead
type api$1_PathHead = PathHead;
type Program
type api$1_Program = Program;
type SourceLocation
type api$1_SourceLocation = SourceLocation;
type SourcePosition
type api$1_SourcePosition = SourcePosition;
type Statement
type api$1_Statement = Statement;
type StatementName
type api$1_StatementName = StatementName;
type Statements
type api$1_Statements = Statements;
type StripFlags
type api$1_StripFlags = StripFlags;
type SubExpression
type api$1_SubExpression = SubExpression;
type SubNode
type api$1_SubNode = SubNode;
type SubNodes
type api$1_SubNodes = SubNodes;
type SubNodeType
type api$1_SubNodeType = SubNodeType;
type TextNode
type api$1_TextNode = TextNode;
type ThisHead
type api$1_ThisHead = ThisHead;
type TopLevelStatement
type api$1_TopLevelStatement = TopLevelStatement;
type UndefinedLiteral
type api$1_UndefinedLiteral = UndefinedLiteral;
type VarHead
type api$1_VarHead = VarHead;
namespace ASTv2
namespace ASTv2 {}
variable AppendContent
const AppendContent: typeof AppendContent;
variable ArgReference
const ArgReference: typeof ArgReference;
variable Args
const Args: typeof Args;
variable Block
const Block: typeof Block;
variable CallExpression
const CallExpression: typeof CallExpression;
variable COMPONENT_NAMESPACE
const COMPONENT_NAMESPACE: string;
variable ComponentArg
const ComponentArg: typeof ComponentArg;
variable ElementModifier
const ElementModifier: typeof ElementModifier;
variable FreeVarReference
const FreeVarReference: typeof FreeVarReference;
variable GlimmerComment
const GlimmerComment: typeof GlimmerComment;
variable HELPER_NAMESPACE
const HELPER_NAMESPACE: string;
variable HTML_RESOLUTION
const HTML_RESOLUTION: { isAngleBracket: true; resolution: () => GetContextualFreeOpcode; serialize: () => SerializedResolution;};
variable HtmlAttr
const HtmlAttr: typeof HtmlAttr;
variable HtmlComment
const HtmlComment: typeof HtmlComment;
variable HtmlText
const HtmlText: typeof HtmlText;
variable InterpolateExpression
const InterpolateExpression: typeof InterpolateExpression;
variable InvokeBlock
const InvokeBlock: typeof InvokeBlock;
variable InvokeComponent
const InvokeComponent: typeof InvokeComponent;
variable isLiteral
const isLiteral: <K extends keyof LiteralTypes = keyof LiteralTypes>( node: ExpressionNode, kind?: K) => node is StringLiteral;
variable isStrictResolution
const isStrictResolution: ( value: unknown) => value is { resolution: () => GetContextualFreeOpcode; serialize: () => SerializedResolution; isAngleBracket: false;};
variable KeywordExpression
const KeywordExpression: typeof KeywordExpression;
variable LiteralExpression
const LiteralExpression: typeof LiteralExpression;
variable loadResolution
const loadResolution: (resolution: SerializedResolution) => FreeVarResolution;
variable LocalVarReference
const LocalVarReference: typeof LocalVarReference;
variable LooseModeResolution
const LooseModeResolution: typeof LooseModeResolution;
variable MODIFIER_NAMESPACE
const MODIFIER_NAMESPACE: string;
variable NamedArgument
const NamedArgument: typeof NamedArgument;
variable NamedArguments
const NamedArguments: typeof NamedArguments;
variable NamedBlock
const NamedBlock: typeof NamedBlock;
variable NamedBlocks
const NamedBlocks: typeof NamedBlocks;
variable node
const node: { (): { fields<Fields extends object>(): NodeConstructor<Fields & BaseNodeFields>; }; <T extends string>(name: T): { fields<Fields extends object>(): TypedNodeConstructor< T, Fields & BaseNodeFields >; };};
variable PathExpression
const PathExpression: typeof PathExpression;
variable PositionalArguments
const PositionalArguments: typeof PositionalArguments;
variable SimpleElement
const SimpleElement: typeof SimpleElement;
variable SplatAttr
const SplatAttr: typeof SplatAttr;
variable STRICT_RESOLUTION
const STRICT_RESOLUTION: { resolution: () => GetContextualFreeOpcode; serialize: () => SerializedResolution; isAngleBracket: false;};
variable Template
const Template: typeof Template;
variable ThisReference
const ThisReference: typeof ThisReference;
type AppendContent
type api_AppendContent = AppendContent;
type ArgReference
type api_ArgReference = ArgReference;
type Args
type api_Args = Args;
type AttrBlockNode
type api_AttrBlockNode = AttrBlockNode;
type AttrNode
type api_AttrNode = AttrNode;
type AttrNodeOptions
type api_AttrNodeOptions = AttrNodeOptions;
type BaseNodeFields
type api_BaseNodeFields = BaseNodeFields;
type Block
type api_Block = Block;
type CalleeNode
type api_CalleeNode = CalleeNode;
type CallExpression
type api_CallExpression = CallExpression;
type CallFields
type api_CallFields = CallFields;
type CallNode
type api_CallNode = CallNode;
type ComponentArg
type api_ComponentArg = ComponentArg;
type ContentNode
type api_ContentNode = ContentNode;
type ElementModifier
type api_ElementModifier = ElementModifier;
type ElementNode
type api_ElementNode = ElementNode;
type ExpressionNode
type api_ExpressionNode = ExpressionNode;
type FreeVarReference
type api_FreeVarReference = FreeVarReference;
type FreeVarResolution
type api_FreeVarResolution = FreeVarResolution;
type GlimmerComment
type api_GlimmerComment = GlimmerComment;
type GlimmerParentNodeOptions
type api_GlimmerParentNodeOptions = GlimmerParentNodeOptions;
type HtmlAttr
type api_HtmlAttr = HtmlAttr;
type HtmlComment
type api_HtmlComment = HtmlComment;
type HtmlOrSplatAttr
type api_HtmlOrSplatAttr = HtmlOrSplatAttr;
type HtmlResolution
type api_HtmlResolution = HtmlResolution;
type HtmlText
type api_HtmlText = HtmlText;
type InterpolateExpression
type api_InterpolateExpression = InterpolateExpression;
type InvokeBlock
type api_InvokeBlock = InvokeBlock;
type InvokeComponent
type api_InvokeComponent = InvokeComponent;
type KeywordExpression
type api_KeywordExpression = KeywordExpression;
type LiteralExpression
type api_LiteralExpression = LiteralExpression;
type LiteralTypes
type api_LiteralTypes = LiteralTypes;
type LiteralValue
type api_LiteralValue = LiteralValue;
type LocalVarReference
type api_LocalVarReference = LocalVarReference;
type LooseModeResolution
type api_LooseModeResolution = LooseModeResolution;
type NamedArgument
type api_NamedArgument = NamedArgument;
type NamedArguments
type api_NamedArguments = NamedArguments;
type NamedBlock
type api_NamedBlock = NamedBlock;
type NamedBlockFields
type api_NamedBlockFields = NamedBlockFields;
type NamedBlocks
type api_NamedBlocks = NamedBlocks;
type NodeConstructor
type api_NodeConstructor<Fields> = NodeConstructor<Fields>;
type PathExpression
type api_PathExpression = PathExpression;
type PositionalArguments
type api_PositionalArguments = PositionalArguments;
type SerializedBaseNode
type api_SerializedBaseNode = SerializedBaseNode;
type SerializedResolution
type api_SerializedResolution = SerializedResolution;
type SimpleElement
type api_SimpleElement = SimpleElement;
type SplatAttr
type api_SplatAttr = SplatAttr;
type StrictResolution
type api_StrictResolution = StrictResolution;
type StringLiteral
type api_StringLiteral = StringLiteral;
type Template
type api_Template = Template;
type ThisReference
type api_ThisReference = ThisReference;
type TypedNodeConstructor
type api_TypedNodeConstructor<T extends string, Fields> = TypedNodeConstructor< T, Fields>;
type VariableReference
type api_VariableReference = VariableReference;
namespace src
namespace src {}
variable hasSpan
const hasSpan: (span: MaybeHasSourceSpan) => span is HasSourceSpan;
variable loc
const loc: (span: HasSourceSpan) => SourceSpan;
variable maybeLoc
const maybeLoc: (location: MaybeHasSourceSpan, fallback: SourceSpan) => SourceSpan;
variable NON_EXISTENT_LOCATION
const NON_EXISTENT_LOCATION: Readonly<{ readonly source: '(nonexistent)'; readonly start: Readonly<{ readonly line: 1; readonly column: 0 }>; readonly end: Readonly<{ readonly line: 1; readonly column: 0 }>;}>;
variable Source
const Source: typeof Source;
variable SourceOffset
const SourceOffset: typeof SourceOffset;
variable SourceSlice
const SourceSlice: typeof SourceSlice;
variable SourceSpan
const SourceSpan: typeof SourceSpan;
variable SpanList
const SpanList: typeof SpanList;
variable SYNTHETIC_LOCATION
const SYNTHETIC_LOCATION: Readonly<{ readonly source: '(synthetic)'; readonly start: Readonly<{ readonly line: 1; readonly column: 0 }>; readonly end: Readonly<{ readonly line: 1; readonly column: 0 }>;}>;
variable UNKNOWN_POSITION
const UNKNOWN_POSITION: Readonly<{ readonly line: 1; readonly column: 0 }>;
type HasSourceSpan
type api$2_HasSourceSpan = HasSourceSpan;
type MaybeHasSourceSpan
type api$2_MaybeHasSourceSpan = MaybeHasSourceSpan;
type SerializedSourceSpan
type api$2_SerializedSourceSpan = SerializedSourceSpan;
type Source
type api$2_Source = Source;
type SourceLocation
type api$2_SourceLocation = SourceLocation;
type SourceOffset
type api$2_SourceOffset = SourceOffset;
type SourcePosition
type api$2_SourcePosition = SourcePosition;
type SourceSlice
type api$2_SourceSlice<Chars extends string = string> = SourceSlice<Chars>;
type SourceSpan
type api$2_SourceSpan = SourceSpan;
type SpanList
type api$2_SpanList = SpanList;
Package Files (1)
Dependencies (5)
Dev Dependencies (8)
Peer Dependencies (0)
No peer dependencies.
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/@glimmer/syntax
.
- Markdown[](https://www.jsdocs.io/package/@glimmer/syntax)
- HTML<a href="https://www.jsdocs.io/package/@glimmer/syntax"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 9685 ms. - Missing or incorrect documentation? Open an issue for this package.