-
Notifications
You must be signed in to change notification settings - Fork 716
Open
Labels
Domain: EditorRelated to the LSP server, editor experienceRelated to the LSP server, editor experience
Description
I suspect this has something to do with boolean
secretly being true | false
under the hood.
package fourslash_test
import (
"testing"
"github.com/microsoft/typescript-go/internal/fourslash"
"github.com/microsoft/typescript-go/internal/testutil"
)
func TestHoverMethodOptionalParam(t *testing.T) {
t.Parallel()
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
const content = `
// @strict: true
class Foo {
methodWith/*1*/OptionalParam(param?: boolean) {
return param
}
}
`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
f.VerifyQuickInfoAt(t, "1", "(method) Foo.methodWithOptionalParam(param?: boolean): boolean | undefined", "")
}
--- FAIL: TestHoverMethodOptionalParam (0.05s)
/home/jabaile/work/TypeScript-go/internal/fourslash/tests/fourslash.go:1350: At marker '1': Hover markdown content mismatch:
(
"""
```tsx
- (method) Foo.methodWithOptionalParam(param?: boolean | undefined): boolean | undefined
+ (method) Foo.methodWithOptionalParam(param?: boolean): boolean
```
"""
)
FAIL
FAIL github.com/microsoft/typescript-go/internal/fourslash/tests 0.056s
FAIL
Compare to:

Metadata
Metadata
Assignees
Labels
Domain: EditorRelated to the LSP server, editor experienceRelated to the LSP server, editor experience