Skip to content

Commit b2b5c02

Browse files
authored
Merge pull request #9 from marcolink/fix/json-value-type
fix: loosen json value type
2 parents 1db0be1 + ead7084 commit b2b5c02

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "generate-json-patch",
3-
"version": "1.1.0",
3+
"version": "1.1.1",
44
"author": "Marco Link <marcoxlink@gmail.com>",
55
"private": false,
66
"repository": "marcolink/generate-json-patch",
@@ -15,10 +15,10 @@
1515
"README.md"
1616
],
1717
"exports": {
18-
"default": "./dist/index.js",
1918
"require": "./dist/index.js",
2019
"import": "./dist/index.mjs",
21-
"node": "./dist/index.js"
20+
"node": "./dist/index.js",
21+
"default": "./dist/index.js"
2222
},
2323
"keywords": [
2424
"json",

src/index.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
import { moveOperations } from './move-operations';
22

3-
export type JsonObject = { [Key in string]: JsonValue | undefined };
4-
5-
export type JsonArray = JsonValue[] | readonly JsonValue[];
6-
73
export type JsonPrimitive = string | number | boolean | null;
84

95
export type JsonValue = JsonPrimitive | JsonObject | JsonArray;
106

7+
export type JsonObject =
8+
| { [Key in string]: JsonValue | undefined }
9+
| { [key: string]: any };
10+
11+
export type JsonArray = JsonValue[] | readonly JsonValue[];
12+
1113
export interface BaseOperation {
1214
path: string;
1315
}

0 commit comments

Comments
 (0)