-
Notifications
You must be signed in to change notification settings - Fork 759
Open
Labels
Description
In a JS file:
/**
* @type {{
* 'string-property': boolean;
*/*$*/ identifierProperty: boolean;
* }}
*/
var someVariable;Request completions at the marker /*$*/.
runtime/debug.Stack()
runtime/debug/stack.go:26 +0x5e
github.com/microsoft/typescript-go/internal/lsp.(*Server).recover(0xc000250008, 0xc0a41dacc0)
github.com/microsoft/typescript-go/internal/lsp/server.go:872 +0x58
panic({0xba49e0?, 0xc0a350c380?})
runtime/panic.go:783 +0x132
github.com/microsoft/typescript-go/internal/astnav.getTokenAtPosition(0xc06b94cf08, 0x31, 0x1, 0x0)
github.com/microsoft/typescript-go/internal/astnav/tokens.go:195 +0x5f9
github.com/microsoft/typescript-go/internal/astnav.GetTokenAtPosition(...)
github.com/microsoft/typescript-go/internal/astnav/tokens.go:40
github.com/microsoft/typescript-go/internal/ls.(*LanguageService).getCompletionData(0xc0a25fe6c0, {0x107f7a8, 0xc0a25fe660}, 0xc06d018c08, 0xc06b94cf08, 0x31, 0xc004a0d200)
github.com/microsoft/typescript-go/internal/ls/completions.go:454 +0xce
github.com/microsoft/typescript-go/internal/ls.(*LanguageService).getCompletionsAtPosition(0xc0a25fe6c0, {0x107f7a8, 0xc0a25fe660}, 0xc06b94cf08, 0x31, 0x0)
github.com/microsoft/typescript-go/internal/ls/completions.go:383 +0x2cf
github.com/microsoft/typescript-go/internal/ls.(*LanguageService).ProvideCompletion(0xc0a25fe6c0, {0x107f7a8, 0xc0a25fe660}, {0xc0a3cc46c0?, 0xc0a25fe660?}, {0xa3cc46c0?, 0xc0?}, 0xc0a41c73e0)
github.com/microsoft/typescript-go/internal/ls/completions.go:44 +0xc8
github.com/microsoft/typescript-go/internal/lsp.(*Server).handleCompletion(0xc001da6008?, {0x107f7a8?, 0xc0a25fe660?}, 0xc0a3cc46c0?, 0x40b92c?)
github.com/microsoft/typescript-go/internal/lsp/server.go:1208 +0x39
github.com/microsoft/typescript-go/internal/lsp.init.func1.registerLanguageServiceDocumentRequestHandler[...].16({0x107f7a8, 0xc0a25fe660}, 0xc0a41dacc0)
github.com/microsoft/typescript-go/internal/lsp/server.go:621 +0x130
github.com/microsoft/typescript-go/internal/lsp.(*Server).handleRequestOrNotification(0xc000250008, {0x107f7e0?, 0xc03a9b8320?}, 0xc0a41dacc0)
github.com/microsoft/typescript-go/internal/lsp/server.go:502 +0x14b
github.com/microsoft/typescript-go/internal/lsp.(*Server).dispatchLoop.func1()
github.com/microsoft/typescript-go/internal/lsp/server.go:405 +0x3a
created by github.com/microsoft/typescript-go/internal/lsp.(*Server).dispatchLoop in goroutine 9
github.com/microsoft/typescript-go/internal/lsp/server.go:425 +0x9ad