-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed as not planned
Labels
DeclinedThe issue was declined as something which matches the TypeScript visionThe issue was declined as something which matches the TypeScript visionSuggestionAn idea for TypeScriptAn idea for TypeScript
Description
π Search Terms
something
β Viability Checklist
- This wouldn't be a breaking change in existing TypeScript/JavaScript code
- This wouldn't change the runtime behavior of existing JavaScript code
- This could be implemented without emitting different JS based on the types of the expressions
- This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
- This isn't a request to add a new utility type: https://github.com/microsoft/TypeScript/wiki/No-New-Utility-Types
- This feature would agree with the rest of our Design Goals: https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals
β Suggestion
type something = {}
π Motivating Example
function returnTypeofButInAllCaps(a: something) {
return typeof String(a ?? [].join()).toLowerCase();
// FIXME: this does not work as expected sometimes
}
π» Use Cases
- What do you want to use this for? As a clearer alternative to writing
{}
- What shortcomings exist with current approaches? Nobody really knows what
{}
means. - What workarounds are you using in the meantime? Using
{}
unwillingly.
alexanderceruttisnarbles2, MartinJohns, xiBread, nmain and james-pre
Metadata
Metadata
Assignees
Labels
DeclinedThe issue was declined as something which matches the TypeScript visionThe issue was declined as something which matches the TypeScript visionSuggestionAn idea for TypeScriptAn idea for TypeScript