You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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.
The text was updated successfully, but these errors were encountered:
blutorange
added a commit
to blutorange/monaco-typescript
that referenced
this issue
Sep 6, 2019
* Update dependency to monaco-editor-core to 0.18.0
* Fix typing errors:
* SignatureHelpAdapter#provideSignatureHelp return a wrapped SignatureHelpResult
* monaco.languages.DocumentSymbol has got a new property: tags
The tags are an array SymbolTags, and the only existing SymbolTag is "Deprecated".
I did not find any information about that in the ts.NavigationBarItem, so the tags
are always an empty array for now.
I'm getting the same error for monaco version 0.18.1.
I defined my own language and want to provide parameter hints for my own custom functions. Here is what is how I defined the monaco.languages.registerSignatureHelpProvider() :
monaco.languages.registerSignatureHelpProvider('LUM', {
signatureHelpTriggerCharacters: ['(',','],
provideSignatureHelp: function(model, position) {
console.log('Signature Help');
return {
activeSignature: 0,
activeParameter:0,
signatures:[{
label: 'string SUBSTRING(string $string, int $start, int $length)',
documentation: " this method returns a subset of a string",
parameters: [{
label: 'string $string',
documentation: "The input string. Must be one character or longer."
},
{
label: 'int $start',
documentation: "This can not be negative and can't be equal to the length
of the string."
},{
label: 'int $length',
documentation: "Must be positive"
}
]
}]
};
}
});
The Signature Help does print on console but there is no parameter suggestion provided by the above function in the browser
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 functionhello
. It doesn't and when you open the console, the following error is logged: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 themonaco-typescript
package is still given asThenable<SignatureHelp>
.Checking the dependencies of the
monaco-typescript
package, it still depends on"monaco-editor-core": "^0.16.0"
, while the current version is0.18.0
. When I update the version to0.18.0
, typescript reports that the types are wrong.The text was updated successfully, but these errors were encountered: