mirror of
https://github.com/swc-project/swc.git
synced 2024-12-24 06:05:02 +03:00
14 lines
316 B
TypeScript
14 lines
316 B
TypeScript
// @strict: true
|
|
|
|
declare const a: string | undefined;
|
|
declare const b: string | undefined;
|
|
declare const c: string | undefined;
|
|
|
|
const foo1 = a ? 1 : 2;
|
|
const foo2 = a ?? 'foo' ? 1 : 2;
|
|
const foo3 = a ?? 'foo' ? (b ?? 'bar') : (c ?? 'baz');
|
|
|
|
function f () {
|
|
const foo4 = a ?? 'foo' ? b ?? 'bar' : c ?? 'baz';
|
|
}
|