Files
tsgo/testdata/baselines/reference/submodule/compiler/expandoFunctionSymbolProperty.js
be5de2a808 Fix declaration emit to remove non-JSDoc comments while preserving JSDoc (#1752)
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: jakebailey <[email protected]>
2025-09-26 02:23:32 +00:00

38 lines
808 B
TypeScript

//// [tests/cases/compiler/expandoFunctionSymbolProperty.ts] ////
//// [expandoFunctionSymbolProperty.ts]
// repro from https://github.com/microsoft/TypeScript/issues/54220
const symb = Symbol();
interface TestSymb {
(): void;
readonly [symb]: boolean;
}
export function test(): TestSymb {
function inner() {}
inner[symb] = true;
return inner;
}
//// [expandoFunctionSymbolProperty.js]
// repro from https://github.com/microsoft/TypeScript/issues/54220
const symb = Symbol();
export function test() {
function inner() { }
inner[symb] = true;
return inner;
}
//// [expandoFunctionSymbolProperty.d.ts]
declare const symb: unique symbol;
interface TestSymb {
(): void;
readonly [symb]: boolean;
}
export declare function test(): TestSymb;
export {};