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

Function rawSlice

packages/compiler-cli/preprocessor/src/processor.ts:2307–2314  ·  view source on GitHub ↗

* `sliceGuarded` wrapped for the output AST, remembering `span` so HMR can tell which identifier * reads the emitted text contains.

(
  s: MagicString | string,
  span: nga.SpanMetadata,
  guards: nga.SpanMetadata[],
  functionSpans?: nga.SpanMetadata[],
)

Source from the content-addressed store, hash-verified

2305 * reads the emitted text contains.
2306 */
2307function rawSlice(
2308 s: MagicString | string,
2309 span: nga.SpanMetadata,
2310 guards: nga.SpanMetadata[],
2311 functionSpans?: nga.SpanMetadata[],
2312): o.WrappedNodeExpr<RawSource> {
2313 return new o.WrappedNodeExpr(new RawSource(sliceGuarded(s, span, guards, functionSpans), [span]));
2314}
2315
2316/**
2317 * Build the `{ type: <Identifier>, args: [...] }` metadata object for a single decorator, slicing

Callers 3

mapDepsFunction · 0.85
compileClassesFunction · 0.85
wrapProviderFieldFunction · 0.85

Calls 1

sliceGuardedFunction · 0.85

Tested by

no test coverage detected