mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-15 03:23:08 -06:00
• A type guard of the form expr1 || expr2 o when true, narrows the type of x to T1 | T2, where T1 is the type of x narrowed by expr1 when true, and T2 is the type of x narrowed by expr1 when false and then by expr2 when true, or o when false, narrows the type of x by expr1 when false and then by expr2 when false.