Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #1144.
-o core.mjsnow emitscore.d.mtsfrom checked telescopes and constructor fields. Runtime and declaration export filtering sharejs_exports; the module retains its default object, while declaration named exports are type-only. Native Nat follows current main's number ABI (#1506), not the older BigInt example in the issue.The declarations preserve recursive tagged values, generic datatype fields, arrays, callback shapes and every prefix of a partially applied exported function. Private identifiers are encoded separately from public type names, including reserved names. Erased/template, kind-returning and unresolved type-family signatures remain runtime exports but are omitted from declarations; an unmapped concrete type reports the def and writes neither file. No
anyapproximation.Both generated paths use the existing input/directory guard before either is written. The separate existing hard-link issue #1495 / PR #1496 is not claimed fixed here.
Real behavior proof
Linux x86_64; Bun CLI 1.3.13, Node v22.23.1, TypeScript 5.9.3 installed as isolated verification tooling, not a repository dependency.
Before, the real typed consumer failed with exit 2 / TS7016 (no declaration for
core.mjs). After actual CLI emission:Four actual TypeScript-compiled Node hosts passed:
true 9.10 10 9 9 9 9.classand helper-like typeBendFn:7 8.[8,5].Negative TypeScript consumers are rejected with TS2614 (invented named value export), TS2345 (invalid direct/partial call), TS2322 (malformed constructor field) and TS2339 (intentionally omitted erased signature). A concrete indexed type not mapped by this emitter exits 1 naming
identity; neither output is created.Regression checks
tests/io/module_declaration_safety.bendand its real JS effect invoke the actual CLI against a derived-sidecar input symlink and directory. Before: prints1; after:0, source preserved and no partial module output.bun gates/repo.ts:PASS: 54 / 54.Limits
No remote mini-cluster/macOS execution. Full dependent type semantics cannot be represented by TypeScript; only faithfully mapped signatures are declared, following the omission/error policy above. Static host checks were exercised with TypeScript 5.9.3.