cotag / ts-md5

Typescript MD5 implemenation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

getting error Cannot find name 'WorkerOptions'.

Devsnapper opened this issue · comments

i am using ts-md5": "^1.2.4" and below is my environment
Angular CLI: 6.2.9
Node: 10.16.0
OS: win32 x64
Angular: 6.1.10
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, platform-server, router

Package Version

@angular-devkit/architect 0.7.5
@angular-devkit/build-angular 0.7.5
@angular-devkit/build-optimizer 0.7.5
@angular-devkit/build-webpack 0.7.5
@angular-devkit/core 0.7.5
@angular-devkit/schematics 0.8.9
@angular/cli 6.2.9
@ngtools/webpack 6.1.5
@schematics/angular 0.8.9
@schematics/update 0.8.9
rxjs 6.5.3
typescript 2.9.2
webpack 4.39.3

while executing the command ng serve i am getting the error as

ERROR in node_modules/ts-md5/dist/parallel_hasher.d.ts(6,52): error TS2304: Cannot find name 'WorkerOptions'.

and when i went to the particular file removed the workerOptions in constructor and it worked but this is not the solution
@stakach @skogsbaer @itsmontoya @johnbendi @qk4

image

@MrYuion do you have any thoughts on this issue?

I assume WorkerOptions is an Angular type leaking into a typescript world

WorkerOptions is part of Typescript 3 definitions. It might not be in Typescript 2.9.x
https://github.com/microsoft/TypeScript/blob/c26c44d5fceb04ea14da20b6ed23449df777ff34/lib/lib.dom.d.ts#L1851