Skip to content

Commit afeacd8

Browse files
committed
remove readonly tags from json-rpc types
This makes these types reuseable in more places. Also remove redundancy in the dictionary type.
1 parent 4bf4079 commit afeacd8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/json-rpc/src/compatibility.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ export type JsonCompatibleValue =
1313
* An array of JsonCompatibleValue
1414
*/
1515
// Use interface extension instead of type alias to make circular declaration possible.
16-
export interface JsonCompatibleArray extends ReadonlyArray<JsonCompatibleValue> {}
16+
export interface JsonCompatibleArray extends Array<JsonCompatibleValue> {}
1717

1818
/**
1919
* A string to json value dictionary.
2020
*/
2121
export interface JsonCompatibleDictionary {
22-
readonly [key: string]: JsonCompatibleValue | readonly JsonCompatibleValue[];
22+
[key: string]: JsonCompatibleValue;
2323
}
2424

2525
export function isJsonCompatibleValue(value: unknown): value is JsonCompatibleValue {

0 commit comments

Comments
 (0)