MCPcopy Create free account
hub / github.com/angular/angular / createSpan

Function createSpan

packages/compiler-cli/preprocessor/src/compiler-utils.ts:129–135  ·  view source on GitHub ↗
(fileName: string, start: number, end: number)

Source from the content-addressed store, hash-verified

127
128/** Creates a source span from a known position. */
129export function createSpan(fileName: string, start: number, end: number): ParseSourceSpan {
130 const file = new ParseSourceFile('', fileName);
131 return new ParseSourceSpan(
132 new ParseLocation(file, start, 0, start),
133 new ParseLocation(file, end, 0, end),
134 );
135}
136
137/**
138 * Create a valid source span for use with host bindings.

Callers 2

adaptHostElementFunction · 0.85
adaptSourceNodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected