Hegel: How to publish packages?

Created on 20 May 2020  路  2Comments  路  Source: JSMonk/hegel

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?

question

All 2 comments

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).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jarble picture jarble  路  4Comments

millsp picture millsp  路  3Comments

trusktr picture trusktr  路  5Comments

nanot1m picture nanot1m  路  4Comments

thecotne picture thecotne  路  5Comments