2016-10-23 16:37:15 -04:00
|
|
|
/**
|
|
|
|
* @license
|
|
|
|
* Copyright Google Inc. All Rights Reserved.
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
|
|
* found in the LICENSE file at https://angular.io/license
|
|
|
|
*/
|
|
|
|
|
2016-05-24 13:53:48 -04:00
|
|
|
import * as ts from 'typescript';
|
|
|
|
|
|
|
|
interface Options extends ts.CompilerOptions {
|
2016-11-16 19:42:24 -05:00
|
|
|
// Absolute path to a directory where generated file structure is written.
|
|
|
|
// If unspecified, generated files will be written alongside sources.
|
|
|
|
genDir?: string;
|
2016-05-24 13:53:48 -04:00
|
|
|
|
|
|
|
// Path to the directory containing the tsconfig.json file.
|
2016-11-16 19:42:24 -05:00
|
|
|
basePath?: string;
|
2016-05-24 13:53:48 -04:00
|
|
|
|
|
|
|
// Don't produce .metadata.json files (they don't work for bundled emit with --out)
|
2016-11-16 19:42:24 -05:00
|
|
|
skipMetadataEmit?: boolean;
|
2016-05-24 13:53:48 -04:00
|
|
|
|
2016-08-22 20:37:48 -04:00
|
|
|
// Produce an error if the metadata written for a class would produce an error if used.
|
2016-11-16 19:42:24 -05:00
|
|
|
strictMetadataEmit?: boolean;
|
2016-08-22 20:37:48 -04:00
|
|
|
|
2016-12-13 20:34:46 -05:00
|
|
|
// Don't produce .ngfactory.ts or .ngstyle.ts files
|
2016-11-16 19:42:24 -05:00
|
|
|
skipTemplateCodegen?: boolean;
|
2016-05-24 13:53:48 -04:00
|
|
|
|
2016-08-23 19:26:35 -04:00
|
|
|
// Whether to generate code for library code.
|
2016-12-13 20:34:46 -05:00
|
|
|
// If true, produce .ngfactory.ts and .ngstyle.ts files for .d.ts inputs.
|
2016-08-23 19:26:35 -04:00
|
|
|
// Default is true.
|
|
|
|
generateCodeForLibraries?: boolean;
|
|
|
|
|
2016-11-16 19:42:24 -05:00
|
|
|
// Insert JSDoc type annotations needed by Closure Compiler
|
|
|
|
annotateForClosureCompiler?: boolean;
|
|
|
|
|
2016-11-14 19:08:38 -05:00
|
|
|
// Modify how angular annotations are emitted to improve tree-shaking.
|
2016-11-16 19:42:24 -05:00
|
|
|
// Default is static fields.
|
|
|
|
// decorators: Leave the Decorators in-place. This makes compilation faster.
|
|
|
|
// TypeScript will emit calls to the __decorate helper.
|
|
|
|
// `--emitDecoratorMetadata` can be used for runtime reflection.
|
|
|
|
// However, the resulting code will not properly tree-shake.
|
|
|
|
// static fields: Replace decorators with a static field in the class.
|
|
|
|
// Allows advanced tree-shakers like Closure Compiler to remove
|
|
|
|
// unused classes.
|
|
|
|
annotationsAs?: 'decorators'|'static fields';
|
2016-11-14 19:08:38 -05:00
|
|
|
|
2016-05-24 13:53:48 -04:00
|
|
|
// Print extra information while running the compiler
|
2016-11-16 19:42:24 -05:00
|
|
|
trace?: boolean;
|
2016-06-15 17:56:56 -04:00
|
|
|
|
|
|
|
// Whether to embed debug information in the compiled templates
|
|
|
|
debug?: boolean;
|
2016-05-24 13:53:48 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
export default Options;
|