question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

'Omit' should alias a distinct mapped type (for display purposes)

See original GitHub issue

Today, Omit will expand to Pick<Exclude<...>, ...> in quick info, error messages, etc. which is gross.

By defining Omit as its own conditional type, we can get a slightly nicer display, though it will introduce duplication of code between the two helpers.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:5
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
DanielRosenwassercommented, Sep 21, 2020

The following type

type Omit<T, ExcludedKeys extends keyof any> = {
    [K in keyof T as Exclude<K, ExcludedKeys>]: T[K]
};

now maintains modifiers thanks to @ahejlsberg’s pull request at #40633.

0reactions
ExE-Bosscommented, Sep 22, 2020
Read more comments on GitHub >

github_iconTop Results From Across the Web

Rob Palmer on Twitter: "My favourite feature in the TypeScript 4.2 ...
It retains abbreviated names for some types, rather than showing you the full ... 'Omit' should alias a distinct mapped type (for display...
Read more >
Choosing between alias and non-alias records
Alias records let you route traffic to selected AWS resources, such as CloudFront distributions and Amazon S3 buckets. They also let you route...
Read more >
TypeORM select alias of column name - mysql - Stack Overflow
i saw the column name option but was thinking what to do if you need to send two different name in two different...
Read more >
mod_alias - Apache HTTP Server Version 2.4
The Alias directive allows documents to be stored in the local filesystem other than under the DocumentRoot . URLs with a (%-decoded) path...
Read more >
Create Aliases to Rename Members in the View - Tableau Help
Aliases can be created for the members of discrete dimensions only. They cannot be created for continuous dimensions, dates, or measures. Create an...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found