mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
ab14d131a7
Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: jakebailey <[email protected]>
32 lines
557 B
TypeScript
32 lines
557 B
TypeScript
//// [tests/cases/compiler/declarationEmitReadonlyAsConst.ts] ////
|
|
|
|
//// [declarationEmitReadonlyAsConst.ts]
|
|
export const value = {
|
|
method(): string {
|
|
return "a";
|
|
},
|
|
prop: {
|
|
nested: 1,
|
|
},
|
|
} as const;
|
|
|
|
|
|
//// [declarationEmitReadonlyAsConst.js]
|
|
export const value = {
|
|
method() {
|
|
return "a";
|
|
},
|
|
prop: {
|
|
nested: 1,
|
|
},
|
|
};
|
|
|
|
|
|
//// [declarationEmitReadonlyAsConst.d.ts]
|
|
export declare const value: {
|
|
readonly method: () => string;
|
|
readonly prop: {
|
|
readonly nested: 1;
|
|
};
|
|
};
|