docs(monaco): update documentation to match the current API status#255
Merged
johnsoncodehk merged 1 commit intovolarjs:masterfrom Dec 23, 2024
Conversation
Member
|
Thank you so much for sorting out all the changes! |
@volar/eslint
@volar/jsdelivr
@volar/language-core
@volar/language-server
@volar/language-service
@volar/kit
@volar/source-map
@volar/monaco
@volar/test-utils
@volar/typescript
@volar/vscode
commit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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/monacodocumentation 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/workerdoesn't export aServiceEnvironmenttype anymore. ThecreateSimpleWorkerLanguageServiceandcreateTypeScriptWorkerLanguageServiceutility functions use theLanguageServiceEnvironmenttype from@volar/language-serviceas the type of theenvparameter.The
LanguageServiceEnvironmenttype admits aworkspaceFoldersproperty instead of aworkspaceFolderone.The aforementioned
workspaceFoldersproperty should be an array ofvscode-uriURIinstead of astring.The import of
typescriptcan 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
createWebWorkermethod ofmonaco-editor, the generic should be theWorkerLanguageServicefrom@volar/monaco/workerinstead ofLanguageServicefrom@volar/language-service.The
registerProvidersutility function also needs thegetSyncUrisfunction.