use-tsconfig 0.0.1

Partial tsconfig metadata primitives for RustUse
Documentation
  • Coverage
  • 87.18%
    34 out of 39 items documented1 out of 37 items with examples
  • Size
  • Source code size: 14.45 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 845.7 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 8s Average build duration of successful builds.
  • all releases: 8s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • RustUse/use-js
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

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);
# Ok::<(), Box<dyn std::error::Error>>(())

Scope

  • Intentionally partial tsconfig.json metadata.
  • Common compiler option fields such as target, module resolution, strict, JSX, base URL, and paths.
  • Optional serde derives behind the serde feature.

Non-goals

  • Full tsconfig schema coverage.
  • JSON parsing.
  • TypeScript compiler behavior or validation parity.

License

Licensed under either Apache-2.0 or MIT.