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 | */
|
---|
8 | /// <amd-module name="@angular/compiler-cli/src/transformers/util" />
|
---|
9 | import * as ts from 'typescript';
|
---|
10 | import { CompilerOptions, Diagnostic } from './api';
|
---|
11 | export declare const GENERATED_FILES: RegExp;
|
---|
12 | export declare const DTS: RegExp;
|
---|
13 | export declare const TS: RegExp;
|
---|
14 | export declare const enum StructureIsReused {
|
---|
15 | Not = 0,
|
---|
16 | SafeModules = 1,
|
---|
17 | Completely = 2
|
---|
18 | }
|
---|
19 | export declare function tsStructureIsReused(program: ts.Program): StructureIsReused;
|
---|
20 | export declare function error(msg: string): never;
|
---|
21 | export declare function userError(msg: string): never;
|
---|
22 | export declare function createMessageDiagnostic(messageText: string): ts.Diagnostic & Diagnostic;
|
---|
23 | export declare function isInRootDir(fileName: string, options: CompilerOptions): string | true | null;
|
---|
24 | export declare function relativeToRootDirs(filePath: string, rootDirs: string[]): string;
|
---|
25 | /**
|
---|
26 | * Converts a ng.Diagnostic into a ts.Diagnostic.
|
---|
27 | * This looses some information, and also uses an incomplete object as `file`.
|
---|
28 | *
|
---|
29 | * I.e. only use this where the API allows only a ts.Diagnostic.
|
---|
30 | */
|
---|
31 | export declare function ngToTsDiagnostic(ng: Diagnostic): ts.Diagnostic;
|
---|
32 | /**
|
---|
33 | * Strip multiline comment start and end markers from the `commentText` string.
|
---|
34 | *
|
---|
35 | * This will also strip the JSDOC comment start marker (`/**`).
|
---|
36 | */
|
---|
37 | export declare function stripComment(commentText: string): string;
|
---|