-
Notifications
You must be signed in to change notification settings - Fork 36
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
JSONValue type is overly wide #52
Comments
can you suggest what are you going to achieve with such a change? |
@vmidyllic I'm not hitting it as a real issue, since my examples using it are valid JSON, but type With the current typing a function is allowed: With the type changed (corrected from my original comment) to |
Hrm, my proposed change doesn't allow interface types, dates, or other objects that implement Not allowing dates may be a feature, though, since they get serialized as an ISO 8601 string not as seconds from epoch. There's a good discussion here: microsoft/TypeScript#1897 |
This issue is stale because it has been open for 14 days with no activity. |
@nedgar we add this task to the backlog. But it's not first priority. |
No worries, it's not urgent at all, thanks. |
This issue is stale because it has been open for 14 days with no activity. |
Hi @nedgar , As our team has acknowledged that we have added this task to our backlog and it will be resolved, You may close the issue. |
This issue is stale because it has been open for 14 days with no activity. |
This issue was closed because it has been inactive for 7 days since being marked as stale. |
The type definition of JSONValue allows
object
andArray<object>
(in addition to string | number | boolean) which seems overly wide.Should it instead be:
type JSONValue = string | number | boolean | JSONObject | Array<JSONObject>
?The text was updated successfully, but these errors were encountered: