mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
79 lines
2.8 KiB
Plaintext
79 lines
2.8 KiB
Plaintext
//// [tests/cases/compiler/expandoFunctionNullishProperty.ts] ////
|
|
|
|
=== expandoFunctionNullishProperty.ts ===
|
|
// mentioned in https://github.com/microsoft/TypeScript/issues/54220
|
|
|
|
interface TestNull {
|
|
>TestNull : Symbol(TestNull, Decl(expandoFunctionNullishProperty.ts, 0, 0))
|
|
|
|
(): void;
|
|
readonly prop: null;
|
|
>prop : Symbol(TestNull.prop, Decl(expandoFunctionNullishProperty.ts, 3, 11))
|
|
}
|
|
|
|
export function testNull(): TestNull {
|
|
>testNull : Symbol(testNull, Decl(expandoFunctionNullishProperty.ts, 5, 1))
|
|
>TestNull : Symbol(TestNull, Decl(expandoFunctionNullishProperty.ts, 0, 0))
|
|
|
|
function inner() {}
|
|
>inner : Symbol(inner, Decl(expandoFunctionNullishProperty.ts, 7, 38))
|
|
|
|
inner.prop = null;
|
|
>inner.prop : Symbol(inner.prop, Decl(expandoFunctionNullishProperty.ts, 8, 21))
|
|
>inner : Symbol(inner, Decl(expandoFunctionNullishProperty.ts, 7, 38))
|
|
>prop : Symbol(inner.prop, Decl(expandoFunctionNullishProperty.ts, 8, 21))
|
|
|
|
return inner;
|
|
>inner : Symbol(inner, Decl(expandoFunctionNullishProperty.ts, 7, 38))
|
|
}
|
|
|
|
interface TestNull2 {
|
|
>TestNull2 : Symbol(TestNull2, Decl(expandoFunctionNullishProperty.ts, 11, 1))
|
|
|
|
(): void;
|
|
prop: string | null;
|
|
>prop : Symbol(TestNull2.prop, Decl(expandoFunctionNullishProperty.ts, 14, 11))
|
|
}
|
|
|
|
export function testNull2(): TestNull2 {
|
|
>testNull2 : Symbol(testNull2, Decl(expandoFunctionNullishProperty.ts, 16, 1))
|
|
>TestNull2 : Symbol(TestNull2, Decl(expandoFunctionNullishProperty.ts, 11, 1))
|
|
|
|
function inner() {}
|
|
>inner : Symbol(inner, Decl(expandoFunctionNullishProperty.ts, 18, 40))
|
|
|
|
inner.prop = null;
|
|
>inner.prop : Symbol(inner.prop, Decl(expandoFunctionNullishProperty.ts, 19, 21))
|
|
>inner : Symbol(inner, Decl(expandoFunctionNullishProperty.ts, 18, 40))
|
|
>prop : Symbol(inner.prop, Decl(expandoFunctionNullishProperty.ts, 19, 21))
|
|
|
|
return inner;
|
|
>inner : Symbol(inner, Decl(expandoFunctionNullishProperty.ts, 18, 40))
|
|
}
|
|
|
|
interface TestUndefined {
|
|
>TestUndefined : Symbol(TestUndefined, Decl(expandoFunctionNullishProperty.ts, 22, 1))
|
|
|
|
(): void;
|
|
readonly prop: undefined;
|
|
>prop : Symbol(TestUndefined.prop, Decl(expandoFunctionNullishProperty.ts, 25, 11))
|
|
}
|
|
|
|
export function testUndefined(): TestUndefined {
|
|
>testUndefined : Symbol(testUndefined, Decl(expandoFunctionNullishProperty.ts, 27, 1))
|
|
>TestUndefined : Symbol(TestUndefined, Decl(expandoFunctionNullishProperty.ts, 22, 1))
|
|
|
|
function inner() {}
|
|
>inner : Symbol(inner, Decl(expandoFunctionNullishProperty.ts, 29, 48))
|
|
|
|
inner.prop = undefined;
|
|
>inner.prop : Symbol(inner.prop, Decl(expandoFunctionNullishProperty.ts, 30, 21))
|
|
>inner : Symbol(inner, Decl(expandoFunctionNullishProperty.ts, 29, 48))
|
|
>prop : Symbol(inner.prop, Decl(expandoFunctionNullishProperty.ts, 30, 21))
|
|
>undefined : Symbol(undefined)
|
|
|
|
return inner;
|
|
>inner : Symbol(inner, Decl(expandoFunctionNullishProperty.ts, 29, 48))
|
|
}
|
|
|