* Use apparent type of original type to handle indexes * Redo older fix causing new bug by extending getDeclaredOrApparentType instead of getTypeWithFacts * Rename symbol
16 lines
315 B
TypeScript
16 lines
315 B
TypeScript
// @strictNullChecks: true
|
|
// https://github.com/Microsoft/TypeScript/issues/20994
|
|
interface Options {
|
|
a?: number | object;
|
|
b: () => void;
|
|
}
|
|
|
|
class C<T extends Options> {
|
|
foo!: { [P in keyof T]: T[P] }
|
|
|
|
method() {
|
|
let { a, b } = this.foo;
|
|
!(a && b);
|
|
a;
|
|
}
|
|
} |