File tree Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ swc_core : patch
3
+ swc_typescript : patch
4
+ ---
5
+
6
+ fix(typescript/dts): Emit ` readonly ` for Object getter prop
Original file line number Diff line number Diff line change @@ -196,7 +196,7 @@ impl FastDts {
196
196
let ( key, computed) = self . transform_property_name_to_expr ( & getter. key ) ;
197
197
members. push ( TsTypeElement :: TsPropertySignature ( TsPropertySignature {
198
198
span : DUMMY_SP ,
199
- readonly : is_const ,
199
+ readonly : true ,
200
200
key : Box :: new ( key) ,
201
201
computed,
202
202
optional : false ,
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ export declare const foo: {
5
5
[Symbol .iterator ]: () => void ;
6
6
[Symbol .asyncIterator ]: () => Promise <void >;
7
7
[globalThis.Symbol.iterator]: () => void;
8
- [Symbol.toStringTag]: string;
8
+ readonly [Symbol.toStringTag]: string;
9
9
};
10
10
export declare abstract class Foo {
11
11
[Symbol .iterator ](): void ;
You can’t perform that action at this time.
0 commit comments