Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gen-host-js: TypeScript type verifications for instance imports #20

Open
guybedford opened this issue Oct 28, 2022 · 0 comments
Open

gen-host-js: TypeScript type verifications for instance imports #20

guybedford opened this issue Oct 28, 2022 · 0 comments
Labels
enhancement New feature or request TypeScript TypeScript output generation

Comments

@guybedford
Copy link
Collaborator

guybedford commented Oct 28, 2022

In bytecodealliance/wit-bindgen#406, having imports treated as ES module imports, results in their types no longer being asserted.

The problem is how to assert the imported types, as opposed to the TypeScript compiler checking them against what is being imported.

A type-level assertion type like type AssertType<Expected, Actual extends Expected> = void may be possible if we were outputting a .ts file for the main interface instead of just a declaration, but isn't permitted in the ambient declaration file.

@guybedford guybedford changed the title gen-host-js: TypeScript type verifications for imports gen-host-js: TypeScript type verifications for instance imports Oct 28, 2022
@alexcrichton alexcrichton transferred this issue from bytecodealliance/wit-bindgen Jan 26, 2023
@guybedford guybedford added the TypeScript TypeScript output generation label Sep 20, 2023
@yoshuawuyts yoshuawuyts added the enhancement New feature or request label Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request TypeScript TypeScript output generation
Projects
None yet
Development

No branches or pull requests

2 participants