Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Set up react.d.ts for incoming improved TypeScript JSX support - #6721

#6721
Closed
RyanCavanaugh wants to merge 1 commit into
DefinitelyTyped:masterDefinitelyTyped/DefinitelyTyped:masterfrom
RyanCavanaugh:improveReactPropsCopy head branch name to clipboard
Closed

Set up react.d.ts for incoming improved TypeScript JSX support#6721
RyanCavanaugh wants to merge 1 commit into
DefinitelyTyped:masterDefinitelyTyped/DefinitelyTyped:masterfrom
RyanCavanaugh:improveReactPropsCopy head branch name to clipboard

Conversation

@RyanCavanaugh

Copy link
Copy Markdown
Member

This sets up react.d.ts to be in good shape for the changes in microsoft/TypeScript#5478

Specifically, once this and microsoft/TypeScript#5596 are in:

  • You won't need to explicitly extend React.Props<T> in component definitions
  • It will be impossible to forget to define ref or key on your component class
  • ref will always have the correct type
  • Stateless function components will work without explicit typing
    • It will be correctly invalid to attempt to specify a ref on a SFC-based element
  • ref callbacks for built-in elements (e.g. div) will have fully-correct contextual types (e.g. x is HTMLDivElement in <div ref={ x => ... } />

@dt-bot

dt-bot commented Nov 11, 2015

Copy link
Copy Markdown
Member

react/react.d.ts

to authors(Asana (account can't detected) AssureSign (account can't detected) Microsoft (account can't detected)). could you review this PR?
👍 or 👎?

check list

  • pass the Travic-CI test?

@RyanCavanaugh

Copy link
Copy Markdown
Member Author

Working on test failures

@vsiao

vsiao commented Nov 12, 2015

Copy link
Copy Markdown
Contributor

It might be easier to do this after we've merged #6205.

@RyanCavanaugh

Copy link
Copy Markdown
Member Author

Starting fresh based on that commit

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.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.