Skip to content

Signature help not working (typescript) #1576

@blutorange

Description

@blutorange

monaco-editor version: 0.18.0

To reproduce, go to the HelloWorld example on the playground and enter hello(. This should bring up the intellisense info for the the function hello. It doesn't and when you open the console, the following error is logged:

VM20 editor.main.js:38 Uncaught Error: Cannot read property 'signatures' of undefined

TypeError: Cannot read property 'signatures' of undefined
    at VM20 editor.main.js:1489
    at VM20 editor.main.js:38

The root cause here seems to be that the SignatureHelpAdapter from the monaco-typescript package returns the wrong type in provideSignatureHelp.

If you take a look a the API docs for provideSignatureHelp, it is supposed to return a ProviderResult<SignatureHelpResult>. But the return type in the monaco-typescript package is still given as Thenable<SignatureHelp>.

Checking the dependencies of the monaco-typescript package, it still depends on "monaco-editor-core": "^0.16.0", while the current version is 0.18.0. When I update the version to 0.18.0, typescript reports that the types are wrong.

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugimportantIssue identified as high-priority

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions