-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Closed
Closed
Copy link
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: Completion ListsThe issue relates to showing completion lists in an editorThe issue relates to showing completion lists in an editorDomain: JSX/TSXRelates to the JSX parser and emitterRelates to the JSX parser and emitter
Milestone
Description
TypeScript Version: 3.0.0-dev.20180706
Search Terms:
TSX generic attribute
Code
import * as React from "react";
class Table<P> extends React.Component<P> {
internalProp: P;
}
type Props = { widthInCol: number; text: string; };
/**
* @param width {number} Table width in px
*/
function createTable(width) {
return <Table<Props> {caret} />
}
createTable(800);
- {caret} is the caret position
Expected behavior:
attributes are shown in code completion
Actual behavior:
"everything" completion is shown
Looks like a specific parsing issue, or just a broken code case not properly handled in code completion handler.
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: Completion ListsThe issue relates to showing completion lists in an editorThe issue relates to showing completion lists in an editorDomain: JSX/TSXRelates to the JSX parser and emitterRelates to the JSX parser and emitter