-
-
Notifications
You must be signed in to change notification settings - Fork 65
Open
Description
Using version 7.0.4 with this tsconfig:
{
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"declaration": true,
"esModuleInterop": true,
"module": "commonjs",
"noImplicitAny": false,
"outDir": "dist/",
"rootDir": "src",
"strict": true,
"target": "es2018",
}
}
I am getting:
tsc --emitDeclarationOnly
node_modules/penpal/dist/penpal.d.ts:193:22 - error TS2304: Cannot find name 'DedicatedWorkerGlobalScope'.
193 worker: Worker | DedicatedWorkerGlobalScope;
Adding to my tsconfig the following under compilerOptions:
"lib": ["es2018", "dom", "webworker"]
the DedicatedWorkerGlobalScope definition is found but then I get a lot type errors with TypeScript libs:
Checking the Penpal tsconfig file, I see "skipLibCheck": true,
is used. Is that voluntary?
Another solution seems to create a global.d.ts and put a dummy definition:
interface DedicatedWorkerGlobalScope extends Worker {}
However, is there no better solution than making such a definition or skipping lib types?
Metadata
Metadata
Assignees
Labels
No labels