// Code generated by convertFourslash; DO NOT EDIT. // To modify this test, run "npm run makemanual tsxCompletion13" package fourslash_test import ( "testing" "github.com/microsoft/typescript-go/internal/fourslash" . "github.com/microsoft/typescript-go/internal/fourslash/tests/util" "github.com/microsoft/typescript-go/internal/ls" "github.com/microsoft/typescript-go/internal/lsp/lsproto" "github.com/microsoft/typescript-go/internal/testutil" ) func TestTsxCompletion13(t *testing.T) { fourslash.SkipIfFailing(t) t.Parallel() defer testutil.RecoverAndFail(t, "Panic on fourslash test") const content = `//@Filename: file.tsx // @jsx: preserve // @skipLibCheck: true declare namespace JSX { interface Element { } interface IntrinsicElements { } interface ElementAttributesProperty { props; } } interface ClickableProps { children?: string; className?: string; } interface ButtonProps extends ClickableProps { onClick(event?: React.MouseEvent): void; } interface LinkProps extends ClickableProps { goTo: string; } declare function MainButton(buttonProps: ButtonProps): JSX.Element; declare function MainButton(linkProps: LinkProps): JSX.Element; declare function MainButton(props: ButtonProps | LinkProps): JSX.Element; let opt = ; let opt = ; let opt = {}} /*3*/ />; let opt = {}} ignore-prop /*4*/ />; let opt = ; let opt = ;` f, done := fourslash.NewFourslash(t, nil /*capabilities*/, content) defer done() f.VerifyCompletions(t, []string{"1", "6"}, &fourslash.CompletionsExpectedList{ IsIncomplete: false, ItemDefaults: &fourslash.CompletionsExpectedItemDefaults{ CommitCharacters: &DefaultCommitCharacters, EditRange: Ignored, }, Items: &fourslash.CompletionsExpectedItems{ Exact: []fourslash.CompletionsExpectedItem{ "goTo", "onClick", &lsproto.CompletionItem{ Label: "children?", InsertText: new("children"), FilterText: new("children"), Kind: new(lsproto.CompletionItemKindField), SortText: new(string(ls.SortTextOptionalMember)), }, &lsproto.CompletionItem{ Label: "className?", InsertText: new("className"), FilterText: new("className"), Kind: new(lsproto.CompletionItemKindField), SortText: new(string(ls.SortTextOptionalMember)), }, }, }, }) f.VerifyCompletions(t, "2", &fourslash.CompletionsExpectedList{ IsIncomplete: false, ItemDefaults: &fourslash.CompletionsExpectedItemDefaults{ CommitCharacters: &DefaultCommitCharacters, EditRange: Ignored, }, Items: &fourslash.CompletionsExpectedItems{ Exact: []fourslash.CompletionsExpectedItem{ "goTo", "onClick", &lsproto.CompletionItem{ Label: "className?", InsertText: new("className"), FilterText: new("className"), Kind: new(lsproto.CompletionItemKindField), SortText: new(string(ls.SortTextOptionalMember)), }, }, }, }) f.VerifyCompletions(t, []string{"3", "4", "5"}, &fourslash.CompletionsExpectedList{ IsIncomplete: false, ItemDefaults: &fourslash.CompletionsExpectedItemDefaults{ CommitCharacters: &DefaultCommitCharacters, EditRange: Ignored, }, Items: &fourslash.CompletionsExpectedItems{ Exact: []fourslash.CompletionsExpectedItem{ &lsproto.CompletionItem{ Label: "children?", InsertText: new("children"), FilterText: new("children"), Kind: new(lsproto.CompletionItemKindField), SortText: new(string(ls.SortTextOptionalMember)), }, &lsproto.CompletionItem{ Label: "className?", InsertText: new("className"), FilterText: new("className"), Kind: new(lsproto.CompletionItemKindField), SortText: new(string(ls.SortTextOptionalMember)), }, }, }, }) }