Suggestion: emit TypeScript type declarations
Closed this issue · 1 comments
bates64 commented
Fairly large feature I expect but it'd be awesome if you could pass a flag to clang++
to generate TypeScript declarations for the module.
e.g.
clang++ -target cheerp-wasm file.c -o file.js -cheerp-make-types=file.d.ts
To emit a file.d.ts
looking something like:
export type InstanciateOptions = {
buffer: /* some typed array */,
} | {
absPath: string | URL,
}
export default function instanciate(options: InstanciateOptions?): Promise<{}>
(And for [jsexport]
'd things, export types for those funcs)
DutChen18 commented
Added in leaningtech/cheerp-compiler#162