ts-reset icon indicating copy to clipboard operation
ts-reset copied to clipboard

A 'CSS reset' for TypeScript, improving types for common JavaScript API's

Results 91 ts-reset issues
Sort by recently updated
recently updated
newest added

Both of the default generic parameters of `Map` are `any`. You should change them to `unknown` for the same reasons that you e.g. change `JSON.parse`. For a more in-depth discussion...

This library is a great idea 💡 I just tried to use it, but realized it's not going to work for my react-native project because react-native ships their own typings:...

Resolves #35 No breaking changes, just making the function typing of `Boolean` work as a predicate.

This is a great project 😍 I add a suggestion to "patch" `Boolean` because I have been stumped by it at multiple occasions, e.g: ```ts const fn = (arg: 'string'...

This solves #16 ```typescript type Union = "a" | "b" | "c"; const foo: Union = "a"; const fooUpperCased: Uppercase = foo.toUpperCase(); // should be 'A' | 'B' | 'C'...

Perhaps this would go further that what is wanted from this library, but I think it'd be nice if `JSON.parse` could return a type similar to (or the same as)...

Methods such as `toLowerCase` and `toUpperCase` do not properly infer union type that are invoked on. [Typescript Playground Link](https://www.typescriptlang.org/play?#code/C4TwDgpgBAqgdgSwPZygXigcgIaagHywCM9DMBjTAbgCgbyUBnYKAMySQC55lUMdqdBnGZsOMMJABOAYWyMIAE06xJEKeXkQAPDxQA+dGKQA6YEgnS5CgBQBKKlAD0TqIwAWSAK4AbRVCJoTABBUiwAITDMGUwaIA) There is solution for that, but due to those methods being...

using unknown for JSON.parse's return type makes total sense, as you have no idea what you will get. equally, you have no idea what the reviver (or replacer) will be...