Skip to content

Commit

Permalink
Merge pull request #9 from marcolink/fix/json-value-type
Browse files Browse the repository at this point in the history
fix: loosen json value type
  • Loading branch information
marcolink authored May 22, 2024
2 parents 1db0be1 + ead7084 commit b2b5c02
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "generate-json-patch",
"version": "1.1.0",
"version": "1.1.1",
"author": "Marco Link <[email protected]>",
"private": false,
"repository": "marcolink/generate-json-patch",
Expand All @@ -15,10 +15,10 @@
"README.md"
],
"exports": {
"default": "./dist/index.js",
"require": "./dist/index.js",
"import": "./dist/index.mjs",
"node": "./dist/index.js"
"node": "./dist/index.js",
"default": "./dist/index.js"
},
"keywords": [
"json",
Expand Down
10 changes: 6 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import { moveOperations } from './move-operations';

export type JsonObject = { [Key in string]: JsonValue | undefined };

export type JsonArray = JsonValue[] | readonly JsonValue[];

export type JsonPrimitive = string | number | boolean | null;

export type JsonValue = JsonPrimitive | JsonObject | JsonArray;

export type JsonObject =
| { [Key in string]: JsonValue | undefined }
| { [key: string]: any };

export type JsonArray = JsonValue[] | readonly JsonValue[];

export interface BaseOperation {
path: string;
}
Expand Down

0 comments on commit b2b5c02

Please sign in to comment.