source: trip-planner-front/node_modules/@angular/cdk/schematics/update-tool/component-resource-collector.d.ts

Last change on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.8 KB
Line 
1/**
2 * @license
3 * Copyright Google LLC All Rights Reserved.
4 *
5 * Use of this source code is governed by an MIT-style license that can be
6 * found in the LICENSE file at https://angular.io/license
7 */
8import * as ts from 'typescript';
9import { FileSystem, WorkspacePath } from './file-system';
10import { LineAndCharacter } from './utils/line-mappings';
11export interface ResolvedResource {
12 /** Class declaration that contains this resource. */
13 container: ts.ClassDeclaration | null;
14 /** File content of the given template. */
15 content: string;
16 /** Start offset of the resource content (e.g. in the inline source file) */
17 start: number;
18 /** Whether the given resource is inline or not. */
19 inline: boolean;
20 /** Path to the file that contains this resource. */
21 filePath: WorkspacePath;
22 /**
23 * Gets the character and line of a given position index in the resource.
24 * If the resource is declared inline within a TypeScript source file, the line and
25 * character are based on the full source file content.
26 */
27 getCharacterAndLineOfPosition: (pos: number) => LineAndCharacter;
28}
29/**
30 * Collector that can be used to find Angular templates and stylesheets referenced within
31 * given TypeScript source files (inline or external referenced files)
32 */
33export declare class ComponentResourceCollector {
34 typeChecker: ts.TypeChecker;
35 private _fileSystem;
36 resolvedTemplates: ResolvedResource[];
37 resolvedStylesheets: ResolvedResource[];
38 constructor(typeChecker: ts.TypeChecker, _fileSystem: FileSystem);
39 visitNode(node: ts.Node): void;
40 private _visitClassDeclaration;
41 /** Resolves an external stylesheet by reading its content and computing line mappings. */
42 resolveExternalStylesheet(filePath: WorkspacePath, container: ts.ClassDeclaration | null): ResolvedResource | null;
43}
Note: See TracBrowser for help on using the repository browser.