- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.1k
Closed
Labels
DuplicateAn existing issue was already createdAn existing issue was already created
Description
TypeScript Version:  2.9.2. strict: true
Search Terms:
jsx discriminant unions, jsx unions
Following code works as expected, but intellisense won't work for additional union attributes ( foo / bar ) although if attribute is provided manually, intellisense works as expected (foo->blah OR wat )
Code
import React, { Component } from 'react'
type Props =
  | {
      type: 'foo'
      foo: 'blah' | 'wat'
    }
  | {
      type: 'bar'
      bar: string
    }
class Test extends Component<Props> {
  render() {
    return null
  }
}
const App = () => (
  <>
    {/* missing `foo` attribute intellisene, but works for literal values */}
    <Test type="foo" />;
    {/* missing `bar` attribute intellisene */}
    <Test type="bar" />
  </>
)Expected behavior:
provide intellisense for supported union attributes
Actual behavior:
Metadata
Metadata
Assignees
Labels
DuplicateAn existing issue was already createdAn existing issue was already created
