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 mixed type #81

Merged
merged 9 commits into from
May 7, 2019
Merged

Add mixed type #81

merged 9 commits into from
May 7, 2019

Conversation

goodmind
Copy link
Contributor

@goodmind goodmind commented Apr 29, 2019

Description

Add mixed type

Related issues:

Checklist

  • I have read CONTRIBUTING.md
  • I have linked all related issues above
  • I have rebased my branch

For new features:

  • I have added entry in TOC and API Docs
  • I have added a short example in API Docs to demonstrate new usage
  • I have added type unit tests with dts-jest

Copy link
Owner

@piotrwitek piotrwitek left a comment

Choose a reason for hiding this comment

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

Thanks for PR! Please check my comment.

README.md Outdated
@@ -138,6 +139,12 @@ Type representing falsey values in TypeScript: `null | undefined | false | 0 | '

[⇧ back to top](#table-of-contents)

### mixed

Alias for `unknown`
Copy link
Owner

Choose a reason for hiding this comment

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

I would prefer this description:
"An arbitrary type that could be anything (Same as unknown)"
https://flow.org/en/docs/types/mixed

README.md Outdated
@@ -63,6 +63,7 @@ Issues can be funded by anyone and the money will be transparently distributed t

* [`Primitive`](#primitive)
* [`Falsey`](#falsey)
* [`mixed`](#mixed)
Copy link
Owner

Choose a reason for hiding this comment

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

Could you please move it as the first item in "Flow's Utility Types" section?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Does it count as utility type tho?

Copy link
Owner

@piotrwitek piotrwitek Apr 29, 2019

Choose a reason for hiding this comment

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

It's only for Flow's migration, nobody using primarily TS would ever want to use it

README.md Outdated
### mixed

An arbitrary type that could be anything (same as `unknown`)

Copy link
Owner

Choose a reason for hiding this comment

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

On line 145, please add a link to the flow docs so it looks consistent with all the remaining flow types

Copy link
Owner

Choose a reason for hiding this comment

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

It still has wrong formatting, not showing below the description, please check how it's done in other types

Copy link
Owner

Choose a reason for hiding this comment

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

hint: two spaces at the end of prev line

README.md Outdated
### mixed

An arbitrary type that could be anything (same as `unknown`)

Copy link
Owner

Choose a reason for hiding this comment

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

hint: two spaces at the end of prev line

README.md Outdated
@@ -957,6 +950,13 @@ function makeStore(storeClass: Class<Store>): Store {

[⇧ back to top](#flows-utility-types)

### mixed

An arbitrary type that could be anything (same as `unknown`)
Copy link
Owner

Choose a reason for hiding this comment

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

still missing 2 spaces on the end of this line

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What spaces?

Copy link
Owner

@piotrwitek piotrwitek Apr 30, 2019

Choose a reason for hiding this comment

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

@goodmind If you don't know how Markdown formatting works, if you add 2 spaces at the end, then it will add a line break. It's the same as adding <br />. I need that because url is stacked on the same line as description which is wrong

Copy link
Owner

@piotrwitek piotrwitek left a comment

Choose a reason for hiding this comment

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

Looks good 👍

@piotrwitek piotrwitek merged commit 8de38fe into piotrwitek:master May 7, 2019
@piotrwitek piotrwitek added this to the v3.7.0 milestone May 7, 2019
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.

Add new alias: mixed
2 participants