Skip to content

Add OXC.isolated_declarations/3 - #9

Merged
dannote merged 2 commits into
masterfrom
isolated-declarations
Oct 7, 2026
Merged

dannote merged 2 commits into
masterfrom
isolated-declarations

Conversation

@dannote

@dannote dannote commented Oct 7, 2026

Copy link
Copy Markdown
Member

Exposes oxc_isolated_declarations (0.130, matching the other oxc crates the NIF uses): parse → IsolatedDeclarations::build → codegen keeping JSDoc. Returns the .d.ts text, or the emitter's diagnostics (TS9007 etc.) through OXC.Diagnostic like transform/3. Options strip_internal and sourcemap (declaration map). NIF registered through RustQ. Groundwork for elixir-volt/volt#71.

Closes #8

Emits a TypeScript module's .d.ts from its source alone, through OXC's
isolated declarations emitter, with strip_internal and sourcemap options.
The emitter reports exported declarations whose types it cannot infer.

Closes #8
The option map arrives as a RustQ-generated NifMap, as the lint crate's
inputs do, in place of a hand-written term reader and atom.
@dannote
dannote merged commit 064d539 into master Oct 7, 2026
2 checks passed
@dannote
dannote deleted the isolated-declarations branch October 7, 2026 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose OXC's isolated declarations, to write .d.ts without tsc

1 participant