Skip to content

added flow types for api data structures and flow-typed declarations …#44

Merged
eugene-sy merged 2 commits intomasterfrom
api-types
May 25, 2017
Merged

added flow types for api data structures and flow-typed declarations …#44
eugene-sy merged 2 commits intomasterfrom
api-types

Conversation

@anru
Copy link
Copy Markdown
Contributor

@anru anru commented May 24, 2017

…for module

@eugene-sy
Copy link
Copy Markdown
Contributor

I have 2 questions for this PR:

  • what does | mean in flow types? I did not found it in flow docs.
  • can we add semicolons after closing bracket in types?

Comment thread types/api/attrs.js
@@ -0,0 +1,13 @@

export type Currency = {|
t: 'price',
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.

Is price a special type?

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.

Comment thread types/api/attrs.js
|}

export type String = {|
t: 'string',
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.

Why string type is in quotes?

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.

same here

Comment thread types/api/sku.js Outdated
salePrice: Currency,
retailPrice: Currency,
},
albums: Array<Album>
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.

Dangling coma?

@kairome
Copy link
Copy Markdown
Contributor

kairome commented May 24, 2017

Do we need that first line in every file to be empty?

@anru
Copy link
Copy Markdown
Contributor Author

anru commented May 24, 2017

@Axblade

what does | mean in flow types? I did not found it in flow docs.

https://flow.org/en/docs/types/objects/#toc-exact-object-types

@eugene-sy eugene-sy merged commit b6d78cb into master May 25, 2017
@eugene-sy eugene-sy deleted the api-types branch May 25, 2017 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants