TypeScript/tests/cases/fourslash/completionsInJsxTag.ts
Jack Works 38e717a244
fix: hyphened name not auto-completed by the ls (#37455)
* fix: hyphened name not auto-completed by the ls

* fix: accept new baseline

* Adds a test to validate the hypened identifiers in JSX

Co-authored-by: Orta Therox <orta.therox@gmail.com>
2020-03-23 17:08:44 -04:00

43 lines
958 B
TypeScript

/// <reference path="fourslash.ts" />
// @jsx: preserve
// @Filename: /a.tsx
////declare namespace JSX {
//// interface Element {}
//// interface IntrinsicElements {
//// div: {
//// /** Doc */
//// foo: string
//// /** Label docs */
//// "aria-label": string
//// }
//// }
////}
////class Foo {
//// render() {
//// <div /*1*/ ></div>;
//// <div /*2*/ />
//// }
////}
verify.completions({
marker: ["1", "2"],
exact: [
{
name: "foo",
text: "(JSX attribute) foo: string",
documentation: "Doc",
kind: "JSX attribute",
kindModifiers: "declare",
},
{
name: "aria-label",
text: "(JSX attribute) \"aria-label\": string",
documentation: "Label docs",
kind: "JSX attribute",
kindModifiers: "declare",
},
],
});