Skip to content

Commit

Permalink
JsonValue: Fix support for readonly arrays (#549)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisvasz committed Jan 30, 2023
1 parent 9284359 commit 311051c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion source/basic.d.ts
Expand Up @@ -26,7 +26,7 @@ Matches a JSON array.
@category JSON
*/
export type JsonArray = JsonValue[];
export type JsonArray = JsonValue[] | readonly JsonValue[];

/**
Matches any valid JSON primitive value.
Expand Down
1 change: 1 addition & 0 deletions test-d/jsonify.ts
Expand Up @@ -47,6 +47,7 @@ expectAssignable<JsonValue>(false);
expectAssignable<JsonValue>(0);
expectAssignable<JsonValue>('');
expectAssignable<JsonValue>([]);
expectAssignable<JsonValue>([] as const);
expectAssignable<JsonValue>({});
expectAssignable<JsonValue>([0]);
expectAssignable<JsonValue>({a: 0});
Expand Down

0 comments on commit 311051c

Please sign in to comment.