Interesting one, quite possible a bug, the behavior seems to have less to do with Omit and more to do with a mapped type that has no keys (ie mapping over never). https://www.typescriptlang.org/play/index.html#code/KYDwDg9gTgLgBDAnmYcDCEC2YCWAbYKAeTBhwgDsBnOAXjgG8AoOVuAIwFcKATAgfgBcjFmzGZgMAIY8p04QwC+AGlGsVTRUyahIsBMlQZs+QiTKUqAdRwwAFhE4wAQtz7AAspKkAROVLoRMS5eAQUtRTgAMjgAJWAAY2geAB4KYAA3QmU4dKyoAD44AHpiuBSAWgq4biTMCQp4exwqbQJ4dikoYWNcAmJScmpApQBuNsk4ADMICB6sPrNByxt7Rxc3Ai9pP2kR0RD3cNUtJk6oQJmIUaA …
@SeaRyanC @drosenwasser Intersection bug? Error disappears (incorrectly) when using Omit https://www.typescriptlang.org/play/index.html#code/KYDwDg9gTgLgBDAnmYcDCEC2YCWAbYKAeTBhwgDsBnOAXjgG8AoOVuAIwFcKATAgfgBcjFmzGZgMAIY8p04QwC+AGlGsVTRUyahIsBMlQZs+QiTKUqAdRwwAFhE4wAQtz7AAspKkAROVLoRMS5eAWEiTFsAHmYxcW9ZeUYNMRU4ACIJaUSpdIA+TTgAeiK4ADI4COjjXAJiUnJqZQyQ93zi0qiAWi64bgBjLAkKeHscKm0CeHYpKGEa03qLakClAG5JyTgAMwgIeaxaswbLG3tHFzcCL2k-aVXRVoIFDS0mGahA3Yg1oA …
-
-
-
One of the rules of intersection types is that you can assign an intersection to a type if any of the constituents of the intersection is assignable to the type, so we can get similar weirdness without omit https://www.typescriptlang.org/play/index.html#code/KYDwDg9gTgLgBDAnmYcDCEC2YCWAbYKAeTBhwgDsBnOAXjgG8AoOVuAIwFcKATAgfgBcjFmzGZgMAIY8p04QwC+AGlGsVauBGFUYUHBQDmTRUyahIsBMlQZs+QiTKUqAdRwwAFhE4wAQtx8wACyklIAInJSdCJiXLwCCqaKrABkrAys2nC6+kZwpkwE8OxSUMJ2uATEpOTUMZnZAERNigDcZsVwAGYQ2ZUONc7U7l4+-oEEodKR0g2i8UFJqlnCLSZmpVAxvRBtQA …pic.twitter.com/MBJZZZzZMv
- 2 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
he/him 