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

negated types #140

Merged
merged 5 commits into from
Oct 5, 2018
Merged

negated types #140

merged 5 commits into from
Oct 5, 2018

Conversation

Mouvedia
Copy link
Collaborator

close #139

@Mouvedia Mouvedia requested a review from ericelliott May 16, 2018 22:45
@Mouvedia Mouvedia changed the title negated types negated types [do not merge] May 16, 2018
@Mouvedia Mouvedia changed the title negated types [do not merge] negated types May 16, 2018
@Mouvedia
Copy link
Collaborator Author

Iv added minor changes from #136.
@ericelliott You will have to squash the commits.

@Mouvedia
Copy link
Collaborator Author

Mouvedia commented May 30, 2018

If you don't like my example Iv got another one:

beforeSend([Function...] | Function) => false | !false

Albeit it wouldn't introduce &.

Copy link
Owner

@ericelliott ericelliott left a comment

Choose a reason for hiding this comment

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

See comments.

README.md Outdated

### Negated Types

It is sometime easier and more informative to delimit a type by defining what it's not. The negation operator let's you exclude by substracting from `Any`.
Copy link
Owner

Choose a reason for hiding this comment

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

/let's/lets/

README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
@Mouvedia
Copy link
Collaborator Author

Mouvedia commented Oct 5, 2018

@ericelliott your comments have been addressed.

@ericelliott ericelliott merged commit c3c5c05 into master Oct 5, 2018
@ericelliott ericelliott deleted the mouvedia-negation branch October 5, 2018 20:12
@Mouvedia
Copy link
Collaborator Author

Mouvedia commented Oct 5, 2018

@ericelliott reminder always squash the commits when merging. I didn't think you wouldn't so I didn't do it.


```js
JSON::parse(String, reviver: Function)
=> Boolean | Number | String | Object | Array | null,
Copy link
Collaborator Author

@Mouvedia Mouvedia Dec 29, 2018

Choose a reason for hiding this comment

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

@ericelliott there's a problem with this example: Array and Object are not precise enough. These objects and arrays must only contain JSON values; i.e. it's recursive.

The example needs to be updated.

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.

not operator (anything but)
2 participants