mesqueeb / is-what

JS type check (TypeScript supported) functions like `isPlainObject() isArray()` etc. A simple & small integration.
https://mesqueeb.github.io/is-what/
MIT License
185 stars 20 forks source link

Use `tsc` #74

Closed jcbhmr closed 7 months ago

jcbhmr commented 1 year ago

This PR would...

This is intended to be a non-breaking migration from rollup to tsc. Later #55 can be considered with the move to ESM-only

THIS DOES NOT SOLVE THE DUAL PACKAGE HAZARD ISSUE!

jcbhmr commented 1 year ago

There's an open issue on typescript github to support changing file extensions at tsc buildtime. That hasn't been encouraged since it's mostly used to cause the not-so-great dual package hazard. Instead TS team seems to recommend that you just build an ESM or CJS and then wrap it in another .mjs or .cjs file as a facade for the other module system. https://github.com/microsoft/TypeScript/issues/49462

jcbhmr commented 1 year ago

I used a tricksy hack to make the cjs folder treat .js as .cjs by putting a {"type":"commonjs"} package.json in there 😆

jcbhmr commented 1 year ago

@mesqueeb This is the next PR that I think should be tackled 😊

mesqueeb commented 7 months ago

closing in favour of https://github.com/mesqueeb/is-what/pull/87