Skip to content
This repository has been archived by the owner on Nov 6, 2019. It is now read-only.

Allow for optional keys in JSON objects #303

Closed
wants to merge 4 commits into from

Conversation

blink1073
Copy link
Contributor

@blink1073 blink1073 commented Jul 18, 2017

Allows for interfaces of the form:

export
interface Foo extends JSONObject {
  bar?: string;
}

cf microsoft/TypeScript#13195

@vidartf
Copy link
Contributor

vidartf commented Aug 9, 2019

Is this something that would be considered, or are we waiting to see if the TS issue gets resolved (there is an experimental PR since April this year)?

@sccolbert
Copy link
Member

I'm worried about the unintended consequences this will have. It will certainly break some existing code, as evidenced by the PR.

@vidartf
Copy link
Contributor

vidartf commented Aug 13, 2019

What about a PR that instead adds additional types PartialJSONObject etc? The existing objects could be cast directly to it.

@sccolbert
Copy link
Member

@vidartf That would work.

@blink1073
Copy link
Contributor Author

Closing in favor of #417

@blink1073 blink1073 closed this Aug 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants