kungfooman / RuntimeTypeInspector.js

Checking JSDoc types at runtime for high-quality types - Trust is good, control is better.
MIT License
8 stars 0 forks source link

Move `getHeader` into Asserter, update Rollup/WebPack plugins #50

Closed kungfooman closed 11 months ago

kungfooman commented 11 months ago

I first developed the Rollup plugin and added this function to it:

https://github.com/kungfooman/RuntimeTypeInspector.js/blob/5f8e1e09a5ac4ee660641e2c0c144e08d69706bb/plugin-rollup/index.mjs#L10-L19

It works, but we need the same code in the other plugins - hence we need to move the code into the transpiler (specifically into Asserter class)

ToDo list:

1) Move getHeader into Asserter 2) Update Rollup plugin 3) Update WebPack plugin

This means the import declarations header will also appear in REPL and for that I already made another PR to support ESM code.

kungfooman commented 11 months ago

Newly published packages to reflect the changes: