mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
da487ee641
Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: RyanCavanaugh <[email protected]>
11 lines
298 B
TypeScript
11 lines
298 B
TypeScript
// @strict: true
|
|
|
|
// Repro for https://github.com/microsoft/TypeScript/issues/63642
|
|
// TS2871 false positive: conditional with ?? null in true branch
|
|
|
|
declare let a: unknown, b: unknown;
|
|
const p = (a ? b ?? null : null) ?? 0;
|
|
|
|
declare let x: string | null | undefined;
|
|
const q = (x ??= null) ?? 0;
|