Closed nnmrts closed 3 years ago
Converted this to a draft because it still has "fork-specific" stuff in there.
Um... can we please not kill the typescript support for this type-validation library?
We are not going to convert back to JS.
We do plan to move to ESM output at the end of April: https://github.com/sindresorhus/meta/discussions/15
@sindresorhus I know that you will move to ESM, that's why I did this (draft), I just didn't know it's only about the output and that you're planning to transpile code to ESM instead of just writing it in...ESM. I don't really understand the value of TypeScript here, because the validation itself, AFAIK, isn't typescript dependent. Also, TypeScript "support" won't be "killed" by this, like @mmkal suggested. TypeScript users could still use this in the exact same way.
But whatever, I'll just use my fork then, since I would still have to import { default as ow } from "ow";
otherwise. (See #196)
I don't really understand the value of TypeScript here, because the validation itself, AFAIK, isn't typescript dependent.
This package is strongly-typed for TypeScript users, which makes usage in TypeScript much better. It also benefits non-TS users in the sense that we can make changes and refactor more confidently because of types, which leads to fewer bugs in general.
Also, TypeScript "support" won't be "killed" by this, like @mmkal suggested. TypeScript users could still use this in the exact same way.
Yes, it practically will. No TS users will want to use this without types.
Alright, I obviously misunderstood how Typescript is used here, sorry.
This basically converts all the typescript stuff to "normal" js. The motivation for this was issue #196 and the fact you have to
const { default: ow } = require("ow");
orimport { default as ow } from "ow";