mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
20 lines
535 B
TypeScript
20 lines
535 B
TypeScript
//// [tests/cases/conformance/expressions/optionalChaining/propertyAccessChain/propertyAccessChain.2.ts] ////
|
|
|
|
//// [propertyAccessChain.2.ts]
|
|
declare const o1: undefined | { b: string };
|
|
o1?.b;
|
|
|
|
declare const o2: undefined | { b: { c: string } };
|
|
o2?.b.c;
|
|
|
|
declare const o3: { b: undefined | { c: string } };
|
|
o3.b?.c;
|
|
|
|
|
|
//// [propertyAccessChain.2.js]
|
|
"use strict";
|
|
var _a;
|
|
o1 === null || o1 === void 0 ? void 0 : o1.b;
|
|
o2 === null || o2 === void 0 ? void 0 : o2.b.c;
|
|
(_a = o3.b) === null || _a === void 0 ? void 0 : _a.c;
|