seroval 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,13 @@
1
1
  export type PrimitiveValue = boolean | string | number | undefined | null | bigint | Date | RegExp;
2
- export type ServerValue = PrimitiveValue | Array<ServerValue> | {
2
+ export type ServerValue = PrimitiveValue | Array<ServerValue> | readonly ServerValue[] | {
3
3
  [key: string | number]: ServerValue;
4
+ } | {
5
+ readonly [key: string | number]: ServerValue;
4
6
  } | Set<ServerValue> | Map<ServerValue, ServerValue>;
5
- export type AsyncServerValue = PrimitiveValue | Array<AsyncServerValue> | {
7
+ export type AsyncServerValue = PrimitiveValue | Array<AsyncServerValue> | readonly AsyncServerValue[] | {
6
8
  [key: string | number]: AsyncServerValue;
9
+ } | {
10
+ readonly [key: string | number]: AsyncServerValue;
7
11
  } | Set<AsyncServerValue> | Map<AsyncServerValue, AsyncServerValue> | PromiseLike<AsyncServerValue>;
8
12
  export type NonPrimitiveServerValue<T> = T extends PrimitiveValue ? never : T;
9
13
  export type MaybePromise<T> = T | Promise<T>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "seroval",
3
3
  "type": "module",
4
- "version": "0.2.0",
4
+ "version": "0.2.1",
5
5
  "files": [
6
6
  "dist",
7
7
  "src"
@@ -64,5 +64,5 @@
64
64
  "typesVersions": {
65
65
  "*": {}
66
66
  },
67
- "gitHead": "d19fddd70b020ebbb61ddaaeef563929d0bfd121"
67
+ "gitHead": "7888af9f6e1d875159dc676d59b59ba4b2e03d7e"
68
68
  }
package/src/types.ts CHANGED
@@ -12,14 +12,18 @@ export type PrimitiveValue =
12
12
  export type ServerValue =
13
13
  | PrimitiveValue
14
14
  | Array<ServerValue>
15
+ | readonly ServerValue[]
15
16
  | { [key: string | number]: ServerValue }
17
+ | { readonly [key: string | number]: ServerValue }
16
18
  | Set<ServerValue>
17
19
  | Map<ServerValue, ServerValue>;
18
20
 
19
21
  export type AsyncServerValue =
20
22
  | PrimitiveValue
21
23
  | Array<AsyncServerValue>
24
+ | readonly AsyncServerValue[]
22
25
  | { [key: string | number]: AsyncServerValue }
26
+ | { readonly [key: string | number]: AsyncServerValue }
23
27
  | Set<AsyncServerValue>
24
28
  | Map<AsyncServerValue, AsyncServerValue>
25
29
  | PromiseLike<AsyncServerValue>;