Files
kjol/tools/tsgo/internal/fourslash/tests/gen/jsdocDeprecated_suggestion10_test.go
2026-07-09 16:50:43 -04:00

50 lines
1.6 KiB
Go

// Code generated by convertFourslash; DO NOT EDIT.
// To modify this test, run "npm run makemanual jsdocDeprecated_suggestion10"
package fourslash_test
import (
"testing"
"github.com/microsoft/typescript-go/internal/fourslash"
"github.com/microsoft/typescript-go/internal/lsp/lsproto"
"github.com/microsoft/typescript-go/internal/testutil"
)
func TestJsdocDeprecated_suggestion10(t *testing.T) {
fourslash.SkipIfFailing(t)
t.Parallel()
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
const content = `// @filename: foo.ts
export namespace foo {
/** @deprecated */
export const bar = 1;
[|bar|];
}
foo.[|bar|];
foo[[|"bar"|]];`
f, done := fourslash.NewFourslash(t, nil /*capabilities*/, content)
defer done()
f.GoToFile(t, "foo.ts")
f.VerifySuggestionDiagnostics(t, []*lsproto.Diagnostic{
{
Code: &lsproto.IntegerOrString{Integer: new(int32(6385))},
Message: lsproto.StringOrMarkupContent{String: new("'bar' is deprecated.")},
Tags: &[]lsproto.DiagnosticTag{lsproto.DiagnosticTagDeprecated},
Range: f.Ranges()[0].LSRange,
},
{
Code: &lsproto.IntegerOrString{Integer: new(int32(6385))},
Message: lsproto.StringOrMarkupContent{String: new("'bar' is deprecated.")},
Tags: &[]lsproto.DiagnosticTag{lsproto.DiagnosticTagDeprecated},
Range: f.Ranges()[1].LSRange,
},
{
Code: &lsproto.IntegerOrString{Integer: new(int32(6385))},
Message: lsproto.StringOrMarkupContent{String: new("'bar' is deprecated.")},
Tags: &[]lsproto.DiagnosticTag{lsproto.DiagnosticTagDeprecated},
Range: f.Ranges()[2].LSRange,
},
})
}