Skip to main content

CompilerOptions

Struct CompilerOptions 

Source
pub struct CompilerOptions {
Show 61 fields pub target: Option<String>, pub module: Option<String>, pub module_resolution: Option<String>, pub resolve_package_json_exports: Option<bool>, pub resolve_package_json_imports: Option<bool>, pub module_suffixes: Option<Vec<String>>, pub resolve_json_module: Option<bool>, pub allow_arbitrary_extensions: Option<bool>, pub allow_importing_ts_extensions: Option<bool>, pub rewrite_relative_import_extensions: Option<bool>, pub types_versions_compiler_version: Option<String>, pub types: Option<Vec<String>>, pub type_roots: Option<Vec<String>>, pub jsx: Option<String>, pub jsx_factory: Option<String>, pub jsx_fragment_factory: Option<String>, pub react_namespace: Option<String>, pub lib: Option<Vec<String>>, pub no_lib: Option<bool>, pub no_types_and_symbols: Option<bool>, pub base_url: Option<String>, pub paths: Option<HashMap<String, Vec<String>, FxBuildHasher>>, pub root_dir: Option<String>, pub out_dir: Option<String>, pub out_file: Option<String>, pub declaration: Option<bool>, pub declaration_dir: Option<String>, pub source_map: Option<bool>, pub declaration_map: Option<bool>, pub ts_build_info_file: Option<String>, pub incremental: Option<bool>, pub strict: Option<bool>, pub no_emit: Option<bool>, pub no_resolve: Option<bool>, pub no_emit_on_error: Option<bool>, pub isolated_modules: Option<bool>, pub custom_conditions: Option<Vec<String>>, pub es_module_interop: Option<bool>, pub allow_synthetic_default_imports: Option<bool>, pub experimental_decorators: Option<bool>, pub import_helpers: Option<bool>, pub allow_js: Option<bool>, pub check_js: Option<bool>, pub skip_lib_check: Option<bool>, pub always_strict: Option<bool>, pub use_define_for_class_fields: Option<bool>, pub no_implicit_any: Option<bool>, pub no_implicit_returns: Option<bool>, pub strict_null_checks: Option<bool>, pub strict_function_types: Option<bool>, pub strict_property_initialization: Option<bool>, pub no_implicit_this: Option<bool>, pub use_unknown_in_catch_variables: Option<bool>, pub no_unchecked_indexed_access: Option<bool>, pub strict_bind_call_apply: Option<bool>, pub no_unused_locals: Option<bool>, pub no_unused_parameters: Option<bool>, pub allow_unreachable_code: Option<bool>, pub no_unchecked_side_effect_imports: Option<bool>, pub no_implicit_override: Option<bool>, pub module_detection: Option<String>,
}

Fields§

§target: Option<String>§module: Option<String>§module_resolution: Option<String>§resolve_package_json_exports: Option<bool>

Use the package.json ‘exports’ field when resolving package imports.

§resolve_package_json_imports: Option<bool>

Use the package.json ‘imports’ field when resolving imports.

§module_suffixes: Option<Vec<String>>

List of file name suffixes to search when resolving a module.

§resolve_json_module: Option<bool>

Enable importing .json files.

§allow_arbitrary_extensions: Option<bool>

Enable importing files with any extension, provided a declaration file is present.

§allow_importing_ts_extensions: Option<bool>

Allow imports to include TypeScript file extensions.

§rewrite_relative_import_extensions: Option<bool>

Rewrite ‘.ts’, ‘.tsx’, ‘.mts’, and ‘.cts’ file extensions in relative import paths.

§types_versions_compiler_version: Option<String>§types: Option<Vec<String>>§type_roots: Option<Vec<String>>§jsx: Option<String>§jsx_factory: Option<String>§jsx_fragment_factory: Option<String>§react_namespace: Option<String>§lib: Option<Vec<String>>§no_lib: Option<bool>§no_types_and_symbols: Option<bool>§base_url: Option<String>§paths: Option<HashMap<String, Vec<String>, FxBuildHasher>>§root_dir: Option<String>§out_dir: Option<String>§out_file: Option<String>§declaration: Option<bool>§declaration_dir: Option<String>§source_map: Option<bool>§declaration_map: Option<bool>§ts_build_info_file: Option<String>§incremental: Option<bool>§strict: Option<bool>§no_emit: Option<bool>§no_resolve: Option<bool>§no_emit_on_error: Option<bool>§isolated_modules: Option<bool>§custom_conditions: Option<Vec<String>>

Custom conditions for package.json exports resolution

§es_module_interop: Option<bool>

Emit additional JavaScript to ease support for importing CommonJS modules

§allow_synthetic_default_imports: Option<bool>

Allow ‘import x from y’ when a module doesn’t have a default export

§experimental_decorators: Option<bool>

Enable experimental support for legacy experimental decorators

§import_helpers: Option<bool>

Import emit helpers from tslib instead of inlining them per-file

§allow_js: Option<bool>

Allow JavaScript files to be a part of your program

§check_js: Option<bool>

Enable error reporting in type-checked JavaScript files

§skip_lib_check: Option<bool>

Skip type checking of declaration files (.d.ts)

§always_strict: Option<bool>

Parse in strict mode and emit “use strict” for each source file

§use_define_for_class_fields: Option<bool>

Use Object.defineProperty semantics for class fields when downleveling.

§no_implicit_any: Option<bool>

Raise error on expressions and declarations with an implied ‘any’ type

§no_implicit_returns: Option<bool>

Enable error reporting when a function doesn’t explicitly return in all code paths

§strict_null_checks: Option<bool>

Enable strict null checks

§strict_function_types: Option<bool>

Enable strict checking of function types

§strict_property_initialization: Option<bool>

Check for class properties that are declared but not set in the constructor

§no_implicit_this: Option<bool>

Raise error on ‘this’ expressions with an implied ‘any’ type

§use_unknown_in_catch_variables: Option<bool>

Default catch clause variables as ‘unknown’ instead of ‘any’

§no_unchecked_indexed_access: Option<bool>

Add ‘undefined’ to a type when accessed using an index

§strict_bind_call_apply: Option<bool>

Check that the arguments for ‘bind’, ‘call’, and ‘apply’ methods match the original function

§no_unused_locals: Option<bool>

Report errors on unused local variables

§no_unused_parameters: Option<bool>

Report errors on unused parameters

§allow_unreachable_code: Option<bool>

Do not report errors on unreachable code

§no_unchecked_side_effect_imports: Option<bool>

Check side-effect imports for module resolution errors

§no_implicit_override: Option<bool>

Require ‘override’ modifier on members that override base class members

§module_detection: Option<String>

Control what method is used to detect module-format JS files.

Trait Implementations§

Source§

impl Clone for CompilerOptions

Source§

fn clone(&self) -> CompilerOptions

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CompilerOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for CompilerOptions

Source§

fn default() -> CompilerOptions

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for CompilerOptions

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<CompilerOptions, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<S, T> Upcast<T> for S
where T: UpcastFrom<S> + ?Sized, S: ?Sized,

Source§

fn upcast(&self) -> &T
where Self: ErasableGeneric, T: ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider ref type within the Wasm bindgen generics type system. Read more
Source§

fn upcast_into(self) -> T
where Self: Sized + ErasableGeneric, T: ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider type within the Wasm bindgen generics type system. Read more
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,