TypeScript/tests/cases/fourslash/completionsJsxAttributeGeneric.ts
Andrew Branch f2146a627c
Fix isInJsxText after JSXOpeningElement with type arguments (#34958)
* Fix `isInJsxText` after JSXOpeningElement with type arguments

* Do the same thing a different way
2019-11-06 15:02:45 -08:00

19 lines
472 B
TypeScript

/// <reference path="fourslash.ts" />
// @Filename: /a.tsx
////declare const React: any;
////declare function CustomComponent<T>(props: { name: string }): JSX.Element;
////const element1 = <CustomComponent<string> /*1*/></CustomComponent>;
////const element2 = <CustomComponent<string> /*2*/ />;
['1', '2'].forEach(marker =>
verify.completions({
marker,
exact: [{
name: 'name',
kind: 'JSX attribute',
kindModifiers: 'declare'
}]
})
);