pub struct CliArgs {Show 139 fields
pub all: bool,
pub build: bool,
pub init: bool,
pub list_files_only: bool,
pub locale: Option<String>,
pub show_config: bool,
pub watch: bool,
pub project: Option<PathBuf>,
pub target: Option<Target>,
pub module: Option<Module>,
pub lib: Option<Vec<String>>,
pub jsx: Option<JsxEmit>,
pub jsx_factory: Option<String>,
pub jsx_fragment_factory: Option<String>,
pub jsx_import_source: Option<String>,
pub no_lib: bool,
pub use_define_for_class_fields: Option<bool>,
pub module_detection: Option<ModuleDetection>,
pub experimental_decorators: bool,
pub emit_decorator_metadata: bool,
pub module_resolution: Option<ModuleResolution>,
pub base_url: Option<PathBuf>,
pub type_roots: Option<Vec<PathBuf>>,
pub types: Option<Vec<String>>,
pub root_dirs: Option<Vec<PathBuf>>,
pub paths: Option<Vec<String>>,
pub plugins: Option<Vec<String>>,
pub resolve_json_module: bool,
pub resolve_package_json_exports: Option<bool>,
pub resolve_package_json_imports: Option<bool>,
pub module_suffixes: Option<Vec<String>>,
pub allow_arbitrary_extensions: bool,
pub allow_importing_ts_extensions: bool,
pub rewrite_relative_import_extensions: bool,
pub custom_conditions: Option<Vec<String>>,
pub no_resolve: bool,
pub allow_umd_global_access: bool,
pub no_unchecked_side_effect_imports: bool,
pub allow_js: bool,
pub check_js: bool,
pub max_node_module_js_depth: Option<u32>,
pub declaration: bool,
pub declaration_dir: Option<PathBuf>,
pub declaration_map: bool,
pub emit_declaration_only: bool,
pub source_map: bool,
pub inline_source_map: bool,
pub inline_sources: bool,
pub out_dir: Option<PathBuf>,
pub root_dir: Option<PathBuf>,
pub out_file: Option<PathBuf>,
pub no_emit: bool,
pub no_emit_on_error: bool,
pub no_emit_helpers: bool,
pub import_helpers: bool,
pub downlevel_iteration: bool,
pub map_root: Option<String>,
pub source_root: Option<String>,
pub new_line: Option<NewLine>,
pub remove_comments: bool,
pub preserve_const_enums: bool,
pub strip_internal: bool,
pub emit_bom: bool,
pub es_module_interop: bool,
pub allow_synthetic_default_imports: Option<bool>,
pub isolated_modules: bool,
pub isolated_declarations: bool,
pub verbatim_module_syntax: bool,
pub force_consistent_casing_in_file_names: Option<bool>,
pub preserve_symlinks: bool,
pub erasable_syntax_only: bool,
pub strict: bool,
pub no_implicit_any: Option<bool>,
pub strict_null_checks: Option<bool>,
pub strict_function_types: Option<bool>,
pub strict_bind_call_apply: Option<bool>,
pub strict_property_initialization: Option<bool>,
pub strict_builtin_iterator_return: Option<bool>,
pub no_implicit_this: Option<bool>,
pub use_unknown_in_catch_variables: Option<bool>,
pub always_strict: Option<bool>,
pub no_unused_locals: bool,
pub no_unused_parameters: bool,
pub exact_optional_property_types: bool,
pub no_implicit_returns: bool,
pub no_fallthrough_cases_in_switch: bool,
pub sound: bool,
pub no_unchecked_indexed_access: bool,
pub no_implicit_override: bool,
pub no_property_access_from_index_signature: bool,
pub allow_unreachable_code: Option<bool>,
pub allow_unused_labels: Option<bool>,
pub skip_default_lib_check: bool,
pub skip_lib_check: bool,
pub composite: bool,
pub incremental: bool,
pub ts_build_info_file: Option<PathBuf>,
pub disable_referenced_project_load: bool,
pub disable_solution_searching: bool,
pub disable_source_of_project_reference_redirect: bool,
pub diagnostics: bool,
pub extended_diagnostics: bool,
pub explain_files: bool,
pub list_files: bool,
pub list_emitted_files: bool,
pub trace_resolution: bool,
pub trace_dependencies: bool,
pub generate_trace: Option<PathBuf>,
pub generate_cpu_profile: Option<PathBuf>,
pub no_check: bool,
pub pretty: Option<bool>,
pub no_error_truncation: bool,
pub preserve_watch_output: bool,
pub watch_file: Option<WatchFileKind>,
pub watch_directory: Option<WatchDirectoryKind>,
pub fallback_polling: Option<PollingWatchKind>,
pub synchronous_watch_directory: bool,
pub exclude_directories: Option<Vec<PathBuf>>,
pub exclude_files: Option<Vec<PathBuf>>,
pub build_verbose: bool,
pub dry: bool,
pub force: bool,
pub clean: bool,
pub stop_build_on_errors: bool,
pub assume_changes_only_affect_direct_dependencies: bool,
pub react_namespace: Option<String>,
pub charset: Option<String>,
pub imports_not_used_as_values: Option<ImportsNotUsedAsValues>,
pub keyof_strings_only: bool,
pub no_implicit_use_strict: bool,
pub no_strict_generic_checks: bool,
pub out: Option<PathBuf>,
pub preserve_value_imports: bool,
pub suppress_excess_property_errors: bool,
pub suppress_implicit_any_index_errors: bool,
pub disable_size_limit: bool,
pub types_versions_compiler_version: Option<String>,
pub batch: bool,
pub files: Vec<PathBuf>,
}Expand description
CLI arguments for the tsz binary.
Fields§
§all: boolShow all compiler options.
build: boolBuild one or more projects and their dependencies, if out of date.
init: boolInitializes a TypeScript project and creates a tsconfig.json file.
list_files_only: boolPrint names of files that are part of the compilation and then stop processing.
locale: Option<String>Set the language of the messaging from TypeScript.
show_config: boolPrint the final configuration instead of building.
watch: boolWatch input files and recompile on changes.
project: Option<PathBuf>Path to tsconfig.json or a directory containing it.
target: Option<Target>Set the JavaScript language version for emitted JavaScript.
module: Option<Module>Specify what module code is generated.
lib: Option<Vec<String>>Specify a set of bundled library declaration files.
jsx: Option<JsxEmit>Specify what JSX code is generated.
jsx_factory: Option<String>Specify the JSX factory function (e.g. ‘React.createElement’).
jsx_fragment_factory: Option<String>Specify the JSX Fragment reference (e.g. ‘React.Fragment’).
jsx_import_source: Option<String>Specify module specifier for JSX factory functions (e.g. ‘react’).
no_lib: boolDisable including any library files, including the default lib.d.ts.
use_define_for_class_fields: Option<bool>Emit ECMAScript-standard-compliant class fields.
module_detection: Option<ModuleDetection>Control what method is used to detect module-format JS files.
experimental_decorators: boolEnable experimental support for legacy experimental decorators.
emit_decorator_metadata: boolEmit design-type metadata for decorated declarations in source files.
module_resolution: Option<ModuleResolution>Specify how TypeScript looks up a file from a given module specifier.
base_url: Option<PathBuf>Specify the base directory to resolve non-relative module names.
type_roots: Option<Vec<PathBuf>>Specify multiple folders that act like ‘./node_modules/@types’.
types: Option<Vec<String>>Specify type package names to be included without being referenced in a source file.
root_dirs: Option<Vec<PathBuf>>Allow multiple folders to be treated as one when resolving modules.
paths: Option<Vec<String>>Specify a set of entries that re-map imports to additional lookup locations. Accepted for CLI compatibility; normally set in tsconfig.json.
plugins: Option<Vec<String>>Specify list of language service plugins. Accepted for CLI compatibility; normally set in tsconfig.json.
resolve_json_module: boolEnable importing .json files.
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.
allow_arbitrary_extensions: boolEnable importing files with any extension, provided a declaration file is present.
allow_importing_ts_extensions: boolAllow imports to include TypeScript file extensions.
rewrite_relative_import_extensions: boolRewrite ‘.ts’, ‘.tsx’, ‘.mts’, and ‘.cts’ file extensions in relative import paths.
custom_conditions: Option<Vec<String>>Conditions to set in addition to the resolver-specific defaults when resolving imports.
no_resolve: boolDisallow ’import’s, ’require’s or ’
allow_umd_global_access: boolAllow accessing UMD globals from modules.
no_unchecked_side_effect_imports: boolCheck side effect imports.
allow_js: boolAllow JavaScript files to be a part of your program.
check_js: boolEnable error reporting in type-checked JavaScript files.
max_node_module_js_depth: Option<u32>Specify the maximum folder depth used for checking JavaScript files from ‘node_modules’.
declaration: boolGenerate .d.ts files from TypeScript and JavaScript files in your project.
declaration_dir: Option<PathBuf>Specify the output directory for generated declaration files.
declaration_map: boolCreate sourcemaps for d.ts files.
emit_declaration_only: boolOnly output d.ts files and not JavaScript files.
source_map: boolCreate source map files for emitted JavaScript files.
inline_source_map: boolInclude sourcemap files inside the emitted JavaScript.
inline_sources: boolInclude source code in the sourcemaps inside the emitted JavaScript.
out_dir: Option<PathBuf>Specify an output folder for all emitted files.
root_dir: Option<PathBuf>Specify the root folder within your source files.
out_file: Option<PathBuf>Specify a file that bundles all outputs into one JavaScript file.
no_emit: boolDisable emitting files from a compilation.
no_emit_on_error: boolDisable emitting files if any type checking errors are reported.
no_emit_helpers: boolDisable generating custom helper functions like ‘__extends’ in compiled output.
import_helpers: boolAllow importing helper functions from tslib once per project.
downlevel_iteration: boolEmit more compliant, but verbose and less performant JavaScript for iteration.
map_root: Option<String>Specify the location where debugger should locate map files instead of generated locations.
source_root: Option<String>Specify the root path for debuggers to find the reference source code.
new_line: Option<NewLine>Set the newline character for emitting files.
remove_comments: boolDisable emitting comments.
preserve_const_enums: boolDisable erasing ‘const enum’ declarations in generated code.
strip_internal: boolDisable emitting declarations that have ‘@internal’ in their JSDoc comments.
emit_bom: boolEmit a UTF-8 Byte Order Mark (BOM) in the beginning of output files.
es_module_interop: boolEmit 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.
isolated_modules: boolEnsure that each file can be safely transpiled without relying on other imports.
isolated_declarations: boolRequire sufficient annotation on exports so other tools can trivially generate declaration files.
verbatim_module_syntax: boolDo not transform or elide any imports or exports not marked as type-only.
force_consistent_casing_in_file_names: Option<bool>Ensure that casing is correct in imports.
preserve_symlinks: boolDisable resolving symlinks to their realpath.
erasable_syntax_only: boolDo not allow runtime constructs that are not part of ECMAScript.
strict: boolEnable all strict type-checking options.
no_implicit_any: Option<bool>Enable error reporting for expressions and declarations with an implied ‘any’ type.
strict_null_checks: Option<bool>When type checking, take into account ‘null’ and ‘undefined’.
strict_function_types: Option<bool>When assigning functions, check to ensure parameters and the return values are subtype-compatible.
strict_bind_call_apply: Option<bool>Check that the arguments for ‘bind’, ‘call’, and ‘apply’ methods match the original function.
strict_property_initialization: Option<bool>Check for class properties that are declared but not set in the constructor.
strict_builtin_iterator_return: Option<bool>Built-in iterators are instantiated with a ‘TReturn’ type of ‘undefined’ instead of ‘any’.
no_implicit_this: Option<bool>Enable error reporting when ‘this’ is given the type ‘any’.
use_unknown_in_catch_variables: Option<bool>Default catch clause variables as ‘unknown’ instead of ‘any’.
always_strict: Option<bool>Ensure ‘use strict’ is always emitted.
no_unused_locals: boolEnable error reporting when local variables aren’t read.
no_unused_parameters: boolRaise an error when a function parameter isn’t read.
exact_optional_property_types: boolInterpret optional property types as written, rather than adding ‘undefined’.
no_implicit_returns: boolEnable error reporting for codepaths that do not explicitly return in a function.
no_fallthrough_cases_in_switch: boolEnable error reporting for fallthrough cases in switch statements.
sound: boolEnable Sound Mode for stricter type checking beyond TypeScript’s defaults.
Catches common unsoundness like mutable array covariance, method bivariance,
any escapes, and excess properties via sticky freshness.
Uses TS9xxx diagnostic codes (TS9001-TS9008).
no_unchecked_indexed_access: boolAdd ‘undefined’ to a type when accessed using an index.
no_implicit_override: boolEnsure overriding members in derived classes are marked with an override modifier.
no_property_access_from_index_signature: boolEnforces using indexed accessors for keys declared using an indexed type.
allow_unreachable_code: Option<bool>Disable error reporting for unreachable code.
allow_unused_labels: Option<bool>Disable error reporting for unused labels.
skip_default_lib_check: boolSkip type checking .d.ts files that are included with TypeScript.
skip_lib_check: boolSkip type checking all .d.ts files.
composite: boolEnable constraints that allow a TypeScript project to be used with project references.
incremental: boolSave .tsbuildinfo files to allow for incremental compilation of projects.
ts_build_info_file: Option<PathBuf>Specify the path to .tsbuildinfo incremental compilation file.
disable_referenced_project_load: boolReduce the number of projects loaded automatically by TypeScript.
disable_solution_searching: boolOpt a project out of multi-project reference checking when editing.
disable_source_of_project_reference_redirect: boolDisable preferring source files instead of declaration files when referencing composite projects.
diagnostics: boolOutput compiler performance information after building.
extended_diagnostics: boolOutput more detailed compiler performance information after building.
explain_files: boolPrint files read during the compilation including why it was included.
list_files: boolPrint all of the files read during the compilation.
list_emitted_files: boolPrint the names of emitted files after a compilation.
trace_resolution: boolLog paths used during the ‘moduleResolution’ process.
trace_dependencies: boolLog all dependencies that were resolved during compilation.
generate_trace: Option<PathBuf>Generates an event trace and a list of types.
generate_cpu_profile: Option<PathBuf>Emit a v8 CPU profile of the compiler run for debugging.
no_check: boolDisable full type checking (only critical parse and emit errors will be reported).
pretty: Option<bool>Enable color and formatting in TypeScript’s output to make compiler errors easier to read.
no_error_truncation: boolDisable truncating types in error messages.
preserve_watch_output: boolDisable wiping the console in watch mode.
watch_file: Option<WatchFileKind>Specify how the TypeScript watch mode works.
watch_directory: Option<WatchDirectoryKind>Specify how directories are watched on systems that lack recursive file-watching functionality.
fallback_polling: Option<PollingWatchKind>Specify what approach the watcher should use if the system runs out of native file watchers.
synchronous_watch_directory: boolSynchronously call callbacks and update the state of directory watchers.
exclude_directories: Option<Vec<PathBuf>>Remove a list of directories from the watch process.
exclude_files: Option<Vec<PathBuf>>Remove a list of files from the watch mode’s processing.
build_verbose: boolEnable verbose logging (build mode).
dry: boolShow what would be built (or deleted, if specified with ‘–clean’).
force: boolBuild all projects, including those that appear to be up to date.
clean: boolDelete the outputs of all projects.
stop_build_on_errors: boolSkip building downstream projects on error in upstream project.
assume_changes_only_affect_direct_dependencies: boolHave recompiles in projects that use ‘incremental’ and ‘watch’ mode assume changes only affect direct dependencies.
react_namespace: Option<String>Deprecated: Specify the object invoked for ‘createElement’ (use –jsxFactory instead).
charset: Option<String>Deprecated: In early versions, manually set the text encoding for reading files.
imports_not_used_as_values: Option<ImportsNotUsedAsValues>Deprecated: Specify emit/checking behavior for imports that are only used for types.
keyof_strings_only: boolDeprecated: Make keyof only return strings instead of string, numbers or symbols.
no_implicit_use_strict: boolDeprecated: Disable adding ‘use strict’ directives in emitted JavaScript files.
no_strict_generic_checks: boolDeprecated: Disable strict checking of generic signatures in function types.
out: Option<PathBuf>Deprecated: Use ‘outFile’ instead.
preserve_value_imports: boolDeprecated: Preserve unused imported values in the JavaScript output.
suppress_excess_property_errors: boolDeprecated: Disable reporting of excess property errors during the creation of object literals.
suppress_implicit_any_index_errors: boolDeprecated: Suppress ‘noImplicitAny’ errors when indexing objects that lack index signatures.
disable_size_limit: boolRemove the 20mb cap on total source code size for JavaScript files in the TypeScript language server.
types_versions_compiler_version: Option<String>Override the compiler version used for typesVersions resolution
(or set TSZ_TYPES_VERSIONS_COMPILER_VERSION).
batch: boolEnter batch mode: read project paths from stdin, one per line, compile each, and print diagnostics followed by a sentinel line. Used by the conformance runner’s process pool for amortized startup.
files: Vec<PathBuf>Input files to compile.
Trait Implementations§
Source§impl Args for CliArgs
impl Args for CliArgs
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl CommandFactory for CliArgs
impl CommandFactory for CliArgs
Source§impl FromArgMatches for CliArgs
impl FromArgMatches for CliArgs
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Parser for CliArgs
impl Parser for CliArgs
Source§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
Source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Source§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
Auto Trait Implementations§
impl Freeze for CliArgs
impl RefUnwindSafe for CliArgs
impl Send for CliArgs
impl Sync for CliArgs
impl Unpin for CliArgs
impl UnsafeUnpin for CliArgs
impl UnwindSafe for CliArgs
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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