Tightens the public API

This commit is contained in:
Orta 2020-08-31 13:38:06 -04:00
parent 166e63b991
commit 5ee395c5ee
3 changed files with 17 additions and 16 deletions

View file

@ -1,19 +1,14 @@
// This example uses @typescript/vfs to create a virtual TS program
// which can do work on a bg thread.
// This version of the vfs edits the global scope (in the case of a webworker, this is 'self')
importScripts("https://unpkg.com/@typescript/vfs@1.3.0/dist/vfs.globals.js")
/**
*
* @param {import("../src/tsWorker").TypeScriptWorker} TypeScriptWorker
* @param {import("typescript")} ts
* @param {Record<string, string>} libFileMap
*
*/
const worker = (TypeScriptWorker, ts, libFileMap) => {
/** @type { import("@typescript/vfs") } */
const tsvfs = globalThis.tsvfs
/** @type { import("@typescript/vfs") } */
const tsvfs = globalThis.tsvfs
/** @type {import("../src/tsWorker").CustomTSWebWorkerFactory }*/
const worker = (TypeScriptWorker, ts, libFileMap) => {
return class MonacoTSWorker extends TypeScriptWorker {
// Adds a custom function to the webworker
@ -59,7 +54,6 @@ const worker = (TypeScriptWorker, ts, libFileMap) => {
recurse(mainSrcFile, 0)
return miniAST
}
}
}