docs(monaco): update documentation to match the current API status #255
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request submits several changes to the
@volar/monaco
documentation to match the current status of the API. It is a follow up of this comment from @johnsoncodehk.Motivation of the changes
The module
@volar/monaco/worker
doesn't export aServiceEnvironment
type anymore. ThecreateSimpleWorkerLanguageService
andcreateTypeScriptWorkerLanguageService
utility functions use theLanguageServiceEnvironment
type from@volar/language-service
as the type of theenv
parameter.The
LanguageServiceEnvironment
type admits aworkspaceFolders
property instead of aworkspaceFolder
one.The aforementioned
workspaceFolders
property should be an array ofvscode-uri
URI
instead of astring
.The import of
typescript
can be converted to a default import because it is exported as the default export and in its types it is exported asexport = ts
.In the
createWebWorker
method ofmonaco-editor
, the generic should be theWorkerLanguageService
from@volar/monaco/worker
instead ofLanguageService
from@volar/language-service
.The
registerProviders
utility function also needs thegetSyncUris
function.