Function strip_project_to_js
pub fn strip_project_to_js(
out: ProjectOutput,
) -> Result<ProjectOutput, StripError>Expand description
Rewrite a compiled ProjectOutput from
TypeScript into a JavaScript artefact (the in-browser track’s first-class JS
output — ADR 0137). The emitter always produces TypeScript; a JS artefact is
that same output with types stripped, which is total because the emitter is
strip-only (ADR 0136).
Every .ts module is type-stripped and renamed to .js; the tsconfig.json
is dropped (a TypeScript-compiler config with no role for a JS artefact); any
other file (e.g. wrangler.toml) passes through unchanged. Source maps and the
debug sidecar are dropped — they map into the .ts the JS replaces. Import
specifiers are already .js (the default ImportExt), so the renamed tree
resolves as-is.