rendajs / Renda

A modern rendering engine for the web.
https://rendajs.org
MIT License
10 stars 4 forks source link

Generate .d.ts files #894

Open jespertheend opened 5 months ago

jespertheend commented 5 months ago

It seems like deno doesn't have great support for parsing JSDoc types. This has several effects:

There's some documentation on how to do this here: https://www.typescriptlang.org/docs/handbook/declaration-files/dts-from-js.html

I tried running this in the jsrPackage directory:

npx -p typescript tsc mod.js --declaration --allowJs --emitDeclarationOnly --outDir .

I had reasonable success with this. Although it seems like it is incredibly slow right now. It's generating lots of large types for binarySerialization.js. We might have to convert binarySerializationTypes.ts to JSDoc as well (#791 related)