-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: This adds support to Flow for [userland-pluggable] typed JSX intrinsics. Out of the box, any intrinsic is typed as `any` (just as all intrinsics are currently typed today). This is important because different apps have different intrinsics (i.e. ReactDOM has things like div/span/table/etc, but ReactNative should have no such intrinsics -- and perhaps may one day have its own set). The design is fairly straightforward: A user includes a libdef that defines a global `$JSXIntrinsics` object type whose keys represent the names of built-ins and whose value-types represent the type of the ReactComponent for the intrinsic. Hopefully the tests do a good job of showing this in action. TypeScript did a pretty good job with their design, so this is inspired heavily by that. Reviewed By: bhosmer Differential Revision: D2714159 fb-gh-sync-id: c7823fb4e4497e3799f633b831b83cd9b3cfd7d0
- Loading branch information
Showing
27 changed files
with
314 additions
and
49 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
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
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
Oops, something went wrong.