swc/crates/swc_ecma_parser/tests/tsc/parentheses.ts
2022-02-04 17:08:38 +09:00

12 lines
364 B
TypeScript

// @noTypesAndSymbols: true
declare const o1: ((...args: any[]) => number);
declare const o2: { b: (...args: any[]) => number };
declare const o3: { b: ((...args: any[]) => (...args: any[]) => number) };
declare const o4: { b: ((...args: any[]) => { c: (...args: any[]) => number } ) };
(o1)(o1 ?? 1);
(o2?.b)(o1 ?? 1);
(o3?.b())(o1 ?? 1);
(o4?.b().c)(o1 ?? 1);