When strictNullChecks is on, check the RHS of the following destructuring assignments for possible null or undefined: const {} = ... const [] = ... let {} = ... let [] = ... ({} = ...)
26 lines
380 B
TypeScript
26 lines
380 B
TypeScript
// @strictNullChecks: true
|
|
|
|
// Repro from #20873
|
|
|
|
let [] = null;
|
|
|
|
let { } = null;
|
|
|
|
({} = null);
|
|
|
|
let { } = undefined;
|
|
|
|
({} = undefined);
|
|
|
|
let { } = Math.random() ? {} : null;
|
|
|
|
({} = Math.random() ? {} : null);
|
|
|
|
let { } = Math.random() ? {} : undefined;
|
|
|
|
({} = Math.random() ? {} : undefined);
|
|
|
|
let { } = Math.random() ? null : undefined;
|
|
|
|
({} = Math.random() ? null : undefined);
|