Closed
Description
From @czb on July 14, 2017 13:43
- VSCode Version: Code 1.14.1 (2648980a697a4c8fb5777dcfb2ab110cec8a2f58, 2017-07-13T19:18:47.188Z)
- OS Version: Windows_NT ia32 10.0.15063
- Extensions:
Extension | Author (truncated) | Version |
---|---|---|
vscodeZoom | chr | 0.0.1 |
Steps to Reproduce:
- Install
@types/react
- Create a ts file and paste:
import * as React from 'react'
interface Props { test: string }
class El extends React.Component<Props, any> { }
React.createElement(El, { test })
- The intellisense of
test
in the last line is broken:
a. When I start typingtest
the intellisense is NOT showingtest
b. When I finish typingtest
the intellisense suddenly finds and properly showstest
(too late though)
c. If I completely erasetest
from the last line, I getProperty 'test' is missing in type '{}'.
error as expected.
I guess the problem is that the intellisense for the second parameter of createElement
is be based on the type of the first parameter.
EDIT: It is not React
specific. The same issue also appears when using Mithril
and other libraries.
Reproduces without extensions: Yes
Copied from original issue: microsoft/vscode#30709