This repository has been archived by the owner on Nov 5, 2021. It is now read-only.
Add types for TypeScriptWorker and missing LanguageServiceDefaults methods #54
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.
Update
monaco.d.ts
with a definition forTypeScriptWorker
and a few of the types fromtypescript
that it depends on, and use the proper return type forgetTypeScriptWorker
/getJavaScriptWorker
.To avoid polluting the
monaco.languages.typescript
module and its docs, I only copied in a few of thetypescript
types (lacking a better heuristic, the ones I need to use) and usedany
for the rest, with comments about the actual types. You can see what it would look like with all the types in this commit (note I had them in a separatemonaco.languages.typescript.ts
namespace at the time), and I could add them back if preferable.Also update
LanguageServiceDefaults
types to add some methods that were missing, and updateCompilerOptions
to add newer compiler options.Remove the
declaration: true
setting from tsconfig since the unqualified references tomonaco
in the generated files can cause problems in other projects (and since those generated files don't impact the finaleditor.api.d.ts
).