How to publish packages?
Since Hegel doesn't emit its own declaration files, I am curious how to publish packages. Does Hegel just read the types from the source files?
For now, the answer is yes, or will inference it in the duration of the analysis of the package (if it doesn't contain any d.ts). But, we are developing compiler (which will be a part of the @hegel/cli) which create d.ts files for the package.
Cool! Looking forward to that!
As Hegel plans to release declaration files, it'd be great for Hegel to avoid having the same problems as TypeScript has in https://github.com/microsoft/TypeScript/issues/35822. The summary is that language features (f.e. type support for class-factory mixins) doesn't work if declaration emit is enabled.
Or in other words, it'll be very nice if all language features of Hegel are fully supported when declaration emit is enabled. Hegel, being new, has the chance to do this part the right way!
I would argue that it is better to add language features when they also work with declaration output (or to put it another way, that declaration output, as well as tests, are required for all language features).