-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* BREAKING CHANGE: make dockets JSON instead of an inferred type * feat(flowTypes): Add flowType info to nodes * fix defaultValue logic
- Loading branch information
1 parent
8ff0414
commit 409014c
Showing
6 changed files
with
70 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
packages/gatsby-transformer-react-docgen/src/__tests__/fixtures/flow.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// @flow | ||
import React, { Component } from "react" | ||
|
||
type Props = { | ||
/** Description of prop "foo". */ | ||
primitive: number, | ||
/** Description of prop "bar". */ | ||
literalsAndUnion: "string" | "otherstring" | number, | ||
arr: Array<any>, | ||
func?: (value: string) => void, | ||
obj?: { subvalue: ?boolean }, | ||
} | ||
|
||
/** | ||
* General component description. | ||
*/ | ||
export default class MyComponent extends Component<void, Props, void> { | ||
props: Props | ||
|
||
render(): ?ReactElement { | ||
// ... | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters