Expand description
§use-tsconfig
Partial practical tsconfig.json metadata primitives for RustUse.
§Experimental
use-tsconfig is experimental while use-js remains below 0.3.0.
§Example
use use_ts::{TsModuleResolution, TsStrictness, TsTarget};
use use_tsconfig::{CompilerOptions, TsConfig, TsConfigInclude};
let options = CompilerOptions::new()
.with_target("es2022".parse::<TsTarget>()?)
.with_module_resolution(TsModuleResolution::Bundler)
.with_strictness(TsStrictness::Strict);
let config = TsConfig::new().with_compiler_options(options).with_include(TsConfigInclude::new("src")?);
assert_eq!(config.include().len(), 1);§Scope
- Intentionally partial
tsconfig.jsonmetadata. - Common compiler option fields such as target, module resolution, strict, JSX, base URL, and paths.
- Optional serde derives behind the
serdefeature.
§Non-goals
- Full
tsconfigschema coverage. - JSON parsing.
- TypeScript compiler behavior or validation parity.
§License
Licensed under either Apache-2.0 or MIT.
Structs§
- Compiler
Options - Partial compiler options metadata.
- TsConfig
- Partial
tsconfig.jsonmetadata. - TsConfig
Exclude - TsConfig
Extends - TsConfig
Include
Enums§
- TsConfig
Text Error - Error returned when tsconfig text metadata is empty.