-
-
Notifications
You must be signed in to change notification settings - Fork 70
Closed
Description
Hi,
I am using @volar/monaco/worker to create a language service for monaco-editor.
With the default monaco-editor TypeScript worker I can use addExtraLib to add an extra type definition so I can define some globals types that do not require to be imported (check the next screenshot using a React code)
| Type definition | Editor |
|---|---|
![]() |
![]() |
During the creation of the language service, I wanted to use my own dtsHost here:
createLanguageService({
config: resolveConfig(
{
services: {
typescript: createTsService({
dtsHost: myOwnDtsHost, // <-here
},
}
}
}
}But I noticed that the types are fetched once the package is required in the code, it is not fetched by default. Debugging, I also noticed that typescript, vue, csstype and other modules are loaded automatically. Is there a way to achieve the same with my custom library and custom type definitions?
Regards and thanks in advance.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels

