MCPcopy Index your code
hub / github.com/angular/angular-cli / getTsSourceFile

Function getTsSourceFile

packages/schematics/angular/service-worker/index.ts:101–106  ·  view source on GitHub ↗
(host: Tree, path: string)

Source from the content-addressed store, hash-verified

99}
100
101function getTsSourceFile(host: Tree, path: string): ts.SourceFile {
102 const content = host.readText(path);
103 const source = ts.createSourceFile(path, content, ts.ScriptTarget.Latest, true);
104
105 return source;
106}
107
108const serviceWorkerSchematic: RuleFactory<ServiceWorkerOptions> = createProjectSchematic(
109 async (options, { project, workspace, tree, context: { logger } }) => {

Callers 2

updateAppModuleFunction · 0.85
addImportFunction · 0.85

Calls 1

readTextMethod · 0.65

Tested by

no test coverage detected