Skip to content

fix(jsii): do not mark "any" or "unknown" as optional (unless "?") - #295

Merged
eladb merged 1 commit into
masterfrom
benisrae/any-is-not-optional
Nov 7, 2018
Merged

eladb merged 1 commit into
masterfrom
benisrae/any-is-not-optional

Conversation

@eladb

@eladb eladb commented Nov 7, 2018

Copy link
Copy Markdown
Contributor

We accidentally marked every "any" and "unknown" types as optional,
regardless if the declaration had a question mark or not.

Fixes #284

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@RomainMuller RomainMuller left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds reasonable. I've opened #296 to track updating the spec so that we model optional and nullable as different concepts (optional should be modeled on the parameter, not on the type ref).

We accidentally marked every "any" and "unknown" types as optional,
regardless if the declaration had a question mark or not.

Fixes #284
@eladb
eladb force-pushed the benisrae/any-is-not-optional branch from d532e64 to 9f9b015 Compare November 7, 2018 11:42
@eladb
eladb merged commit cdf5a53 into master Nov 7, 2018
@eladb
eladb deleted the benisrae/any-is-not-optional branch November 7, 2018 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants