mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
22 lines
440 B
TypeScript
22 lines
440 B
TypeScript
//// [tests/cases/conformance/classes/constructorDeclarations/constructorParameters/declarationEmitReadonly.ts] ////
|
|
|
|
//// [declarationEmitReadonly.ts]
|
|
class C {
|
|
constructor(readonly x: number) {}
|
|
}
|
|
|
|
//// [declarationEmitReadonly.js]
|
|
"use strict";
|
|
class C {
|
|
constructor(x) {
|
|
this.x = x;
|
|
}
|
|
}
|
|
|
|
|
|
//// [declarationEmitReadonly.d.ts]
|
|
declare class C {
|
|
readonly x: number;
|
|
constructor(x: number);
|
|
}
|