ts-reset
ts-reset copied to clipboard
A 'CSS reset' for TypeScript, improving types for common JavaScript API's
The built-in types for `JSON.stringify()` are not correct/sound because `JSON.stringify()` will return `undefined` if `undefined` is passed in (or function or symbol). Many devs don't know this and TS types...
I'm not sure if this idea - https://github.com/total-typescript/ts-reset/issues/41- is taken into account, so I didn't complete the readme file. I could update the readme if this feature will be accepted.
Codebase needs `.prettierrc.json` for consistent formatting on PRs Github Actions might also validate if the formatting of the PR is correct Or it can format the code itself
As described in the title. I’m not sure if it belongs to a reset, but it’s disappointing to call `join` a readonly-array and receive a bland `string` Same goes for...
Handled the cases when the input is `any[]` or `any` and not `unknown` or `unknown[]` https://github.com/total-typescript/ts-reset/issues/48#issuecomment-1440269813 You might wanna check if the test are correct.
Currently, `require` faces a similar problem to `JSON.parse`, where it returns `any`. Like `JSON.parse`, I think this would be another great place to reset the return type to be unknown....
Hi, I recently saw your YT video and wanted to add ts-reset to our project. But there is an issue which I find difficult to overcome: Basically the problem is...
Given the following code: ```ts (["a", "b", "c"] as const).includes(SOME_VALUE as 'a' | 'b' | 'd' ) ``` we get a Typeguard that `SOME_VALUE` is `'a' | 'b' | 'c'`...
Fix the annoying thing where `Array.isArray` doesn't correctly narrow ReadonlyArray!