Skip to content

Add type something = {}Β #61847

Closed as not planned
Closed as not planned
@sdegutis

Description

@sdegutis

πŸ” Search Terms

something

βœ… Viability Checklist

⭐ 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

  1. What do you want to use this for? As a clearer alternative to writing {}
  2. What shortcomings exist with current approaches? Nobody really knows what {} means.
  3. What workarounds are you using in the meantime? Using {} unwillingly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DeclinedThe issue was declined as something which matches the TypeScript visionSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions