@Generated(value="jsii-pacmak/1.47.0 (build 86d2c33)", date="2021-12-20T00:39:28.887Z") @Stability(value=Experimental) public interface TypeScriptCompilerOptions extends software.amazon.jsii.JsiiSerializable
| Modifier and Type | Interface and Description |
|---|---|
static class |
TypeScriptCompilerOptions.Builder
A builder for
TypeScriptCompilerOptions |
static class |
TypeScriptCompilerOptions.Jsii$Proxy
An implementation for
TypeScriptCompilerOptions |
| Modifier and Type | Method and Description |
|---|---|
static TypeScriptCompilerOptions.Builder |
builder() |
default Boolean |
getAllowJs()
(experimental) Allow JavaScript files to be compiled.
|
default Boolean |
getAllowSyntheticDefaultImports()
(experimental) Allow default imports from modules with no default export.
|
default Boolean |
getAlwaysStrict()
(experimental) Ensures that your files are parsed in the ECMAScript strict mode, and emit “use strict” for each source file.
|
default String |
getBaseUrl()
(experimental) Lets you set a base directory to resolve non-absolute module names.
|
default Boolean |
getDeclaration()
(experimental) To be specified along with the above.
|
default String |
getDeclarationDir()
(experimental) Offers a way to configure the root directory for where declaration files are emitted.
|
default Boolean |
getEmitDecoratorMetadata()
(experimental) Enables experimental support for decorators, which is in stage 2 of the TC39 standardization process.
|
default Boolean |
getEsModuleInterop()
(experimental) Emit __importStar and __importDefault helpers for runtime babel ecosystem compatibility and enable --allowSyntheticDefaultImports for typesystem compatibility.
|
default Boolean |
getExperimentalDecorators()
(experimental) Enables experimental support for decorators, which is in stage 2 of the TC39 standardization process.
|
default Boolean |
getForceConsistentCasingInFileNames()
(experimental) Disallow inconsistently-cased references to the same file.
|
default Boolean |
getInlineSourceMap()
(experimental) When set, instead of writing out a .js.map file to provide source maps, TypeScript will embed the source map content in the .js files.
|
default Boolean |
getInlineSources()
(experimental) When set, TypeScript will include the original content of the .ts file as an embedded string in the source map.
|
default Boolean |
getIsolatedModules()
(experimental) Perform additional checks to ensure that separate compilation (such as with transpileModule or @babel/plugin-transform-typescript) would be safe.
|
default TypeScriptJsxMode |
getJsx()
(experimental) Support JSX in .tsx files: "react", "preserve", "react-native" etc.
|
default List<String> |
getLib()
(experimental) Reference for type definitions / libraries to use (eg.
|
default String |
getModule()
(experimental) Sets the module system for the program.
|
default TypeScriptModuleResolution |
getModuleResolution()
(experimental) Determine how modules get resolved.
|
default Boolean |
getNoEmit()
(experimental) Do not emit outputs.
|
default Boolean |
getNoEmitOnError()
(experimental) Do not emit compiler output files like JavaScript source code, source-maps or declarations if any errors were reported.
|
default Boolean |
getNoFallthroughCasesInSwitch()
(experimental) Report errors for fallthrough cases in switch statements.
|
default Boolean |
getNoImplicitAny()
(experimental) In some cases where no type annotations are present, TypeScript will fall back to a type of any for a variable when it cannot infer the type.
|
default Boolean |
getNoImplicitReturns()
(experimental) When enabled, TypeScript will check all code paths in a function to ensure they return a value.
|
default Boolean |
getNoImplicitThis()
(experimental) Raise error on ‘this’ expressions with an implied ‘any’ type.
|
default Boolean |
getNoPropertyAccessFromIndexSignature()
(experimental) Raise error on use of the dot syntax to access fields which are not defined.
|
default Boolean |
getNoUncheckedIndexedAccess()
(experimental) Raise error when accessing indexes on objects with unknown keys defined in index signatures.
|
default Boolean |
getNoUnusedLocals()
(experimental) Report errors on unused local variables.
|
default Boolean |
getNoUnusedParameters()
(experimental) Report errors on unused parameters in functions.
|
default String |
getOutDir()
(experimental) Output directory for the compiled files.
|
default Map<String,List<String>> |
getPaths()
(experimental) A series of entries which re-map imports to lookup locations relative to the baseUrl, there is a larger coverage of paths in the handbook.
|
default Boolean |
getResolveJsonModule()
(experimental) Allows importing modules with a ‘.json’ extension, which is a common practice in node projects.
|
default String |
getRootDir()
(experimental) Specifies the root directory of input files.
|
default Boolean |
getSkipLibCheck()
(experimental) Skip type checking of all declaration files (*.d.ts).
|
default Boolean |
getStrict()
(experimental) The strict flag enables a wide range of type checking behavior that results in stronger guarantees of program correctness.
|
default Boolean |
getStrictNullChecks()
(experimental) When strictNullChecks is false, null and undefined are effectively ignored by the language.
|
default Boolean |
getStrictPropertyInitialization()
(experimental) When set to true, TypeScript will raise an error when a class property was declared but not set in the constructor.
|
default Boolean |
getStripInternal()
(experimental) Do not emit declarations for code that has an @internal annotation in it’s JSDoc comment.
|
default String |
getTarget()
(experimental) Modern browsers support all ES6 features, so ES6 is a good choice.
|
@Stability(value=Experimental) @Nullable default Boolean getAllowJs()
Default: false
@Stability(value=Experimental) @Nullable default Boolean getAllowSyntheticDefaultImports()
This does not affect code emit, just typechecking.
@Stability(value=Experimental) @Nullable default Boolean getAlwaysStrict()
Default: true
@Stability(value=Experimental) @Nullable default String getBaseUrl()
You can define a root folder where you can do absolute file resolution.
@Stability(value=Experimental) @Nullable default Boolean getDeclaration()
@Stability(value=Experimental) @Nullable default String getDeclarationDir()
@Stability(value=Experimental) @Nullable default Boolean getEmitDecoratorMetadata()
Decorators are a language feature which hasn’t yet been fully ratified into the JavaScript specification. This means that the implementation version in TypeScript may differ from the implementation in JavaScript when it it decided by TC39. You can find out more about decorator support in TypeScript in the handbook.
Default: undefined
https://www.typescriptlang.org/docs/handbook/decorators.html@Stability(value=Experimental) @Nullable default Boolean getEsModuleInterop()
Default: false
@Stability(value=Experimental) @Nullable default Boolean getExperimentalDecorators()
Default: true
@Stability(value=Experimental) @Nullable default Boolean getForceConsistentCasingInFileNames()
Default: false
@Stability(value=Experimental) @Nullable default Boolean getInlineSourceMap()
Default: true
@Stability(value=Experimental) @Nullable default Boolean getInlineSources()
Default: true
@Stability(value=Experimental) @Nullable default Boolean getIsolatedModules()
Default: false
@Stability(value=Experimental) @Nullable default TypeScriptJsxMode getJsx()
Default: undefined
@Stability(value=Experimental) @Nullable default List<String> getLib()
ES2016, ES5, ES2018).
Default: [ "es2018" ]
@Stability(value=Experimental) @Nullable default String getModule()
See https://www.typescriptlang.org/docs/handbook/modules.html#ambient-modules.
Default: "CommonJS"
@Stability(value=Experimental) @Nullable default TypeScriptModuleResolution getModuleResolution()
Either "Node" for Node.js/io.js style resolution, or "Classic".
Default: "node"
@Stability(value=Experimental) @Nullable default Boolean getNoEmit()
Default: false
@Stability(value=Experimental) @Nullable default Boolean getNoEmitOnError()
Default: true
@Stability(value=Experimental) @Nullable default Boolean getNoFallthroughCasesInSwitch()
Ensures that any non-empty case inside a switch statement includes either break or return. This means you won’t accidentally ship a case fallthrough bug.
Default: true
@Stability(value=Experimental) @Nullable default Boolean getNoImplicitAny()
Default: true
@Stability(value=Experimental) @Nullable default Boolean getNoImplicitReturns()
Default: true
@Stability(value=Experimental) @Nullable default Boolean getNoImplicitThis()
Default: true
@Stability(value=Experimental) @Nullable default Boolean getNoPropertyAccessFromIndexSignature()
Default: true
@Stability(value=Experimental) @Nullable default Boolean getNoUncheckedIndexedAccess()
Default: true
@Stability(value=Experimental) @Nullable default Boolean getNoUnusedLocals()
Default: true
@Stability(value=Experimental) @Nullable default Boolean getNoUnusedParameters()
Default: true
@Stability(value=Experimental) @Nullable default String getOutDir()
@Stability(value=Experimental) @Nullable default Map<String,List<String>> getPaths()
paths lets you declare how TypeScript should resolve an import in your require/imports.
@Stability(value=Experimental) @Nullable default Boolean getResolveJsonModule()
Default: true
@Stability(value=Experimental) @Nullable default String getRootDir()
Only use to control the output directory structure with outDir.
@Stability(value=Experimental) @Nullable default Boolean getSkipLibCheck()
Default: false
@Stability(value=Experimental) @Nullable default Boolean getStrict()
Turning this on is equivalent to enabling all of the strict mode family options, which are outlined below. You can then turn off individual strict mode family checks as needed.
Default: true
@Stability(value=Experimental) @Nullable default Boolean getStrictNullChecks()
This can lead to unexpected errors at runtime. When strictNullChecks is true, null and undefined have their own distinct types and you’ll get a type error if you try to use them where a concrete value is expected.
Default: true
@Stability(value=Experimental) @Nullable default Boolean getStrictPropertyInitialization()
Default: true
@Stability(value=Experimental) @Nullable default Boolean getStripInternal()
Default: true
@Stability(value=Experimental) @Nullable default String getTarget()
You might choose to set a lower target if your code is deployed to older environments, or a higher target if your code is guaranteed to run in newer environments.
Default: "ES2018"
@Stability(value=Experimental) static TypeScriptCompilerOptions.Builder builder()
TypeScriptCompilerOptions.Builder of TypeScriptCompilerOptionsCopyright © 2021. All rights reserved.