Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add JSONObject type #13

Open
mesqueeb opened this issue Sep 2, 2020 · 1 comment
Open

add JSONObject type #13

mesqueeb opened this issue Sep 2, 2020 · 1 comment
Labels
question Further information is requested

Comments

@mesqueeb
Copy link
Owner

mesqueeb commented Sep 2, 2020

type Primitive =
  | bigint
  | boolean
  | null
  | number
  | string
  | symbol
  | undefined;

type JSONValue = Primitive | JSONObject | JSONArray;

interface JSONObject {
  [key: string]: JSONValue;
}

interface JSONArray extends Array<JSONValue> { }
@jcbhmr
Copy link
Collaborator

jcbhmr commented Jun 2, 2023

Would this be added to a isJSONObject() and friends collection of checking functions?

@jcbhmr jcbhmr added the question Further information is requested label Jun 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants