Skip to content

Commit

Permalink
revert(types): aea1f33
Browse files Browse the repository at this point in the history
Signed-off-by: Lexus Drumgold <[email protected]>
  • Loading branch information
unicornware committed Dec 2, 2022
1 parent d3b4e43 commit 2dd3c8f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
6 changes: 2 additions & 4 deletions src/types/json-object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ import type JSONValue from './json-value'
* is JSON-compatible: `interface CustomResponse extends JSONObject { … }`.
*
* [1]: https://restfulapi.net/json-data-types
*
* @template T - JSON value type
*/
type JSONObject<T extends JSONValue = JSONValue> = { [K in string]?: T }
type JSONObject = { [K in string]?: JSONValue }

export { type JSONObject as default }
export type { JSONObject as default }
7 changes: 2 additions & 5 deletions src/types/json-value.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ import type JSONPrimitive from './json-primitive'
*
* [1]: https://restfulapi.net/json-data-types
*/
type JSONValue =
| JSONArray
| JSONObject<JSONArray | JSONPrimitive | { [K in string]?: JSONValue }>
| JSONPrimitive
type JSONValue = JSONArray | JSONObject | JSONPrimitive

export { type JSONValue as default }
export type { JSONValue as default }

0 comments on commit 2dd3c8f

Please sign in to comment.