-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptFix AvailableA PR has been opened for this issueA PR has been opened for this issueFixedA PR has been merged for this issueA PR has been merged for this issue
Milestone
Description
TypeScript Version: 2.9.1
Search Terms:
keyof well known symbol
Code
const s = Symbol("s");
interface I {
n: number;
[s]: string;
[Symbol.iterator](): IterableIterator<[string, string]>;
}
type K = keyof I;
type T = I[K];
Expected behavior:
type K = keyof I; // type K = typeof s | "n" | typeof Symbol.iterator
type T = I[K]; // type T = string | number | () => IterableIterator<[string, string]>
Actual behavior:
type K = keyof I; // type K = typeof s | "n"
type T = I[K]; // type T = string | number
bluenote10, nicklaros, theftprevention, jcalz, hackape and 7 morelieene and ExE-Boss
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFix AvailableA PR has been opened for this issueA PR has been opened for this issueFixedA PR has been merged for this issueA PR has been merged for this issue