Skip to content

Leaking global definition of importScripts #154

@kitsonk

Description

@kitsonk

Bug

When you use the loader with other packages downstream, and those packages try to assert a web worker environment, the global declaration of importScripts conflicts with that, causing errors like:

error TS2451: Cannot redeclare block-scoped variable 'importScripts'.

Since it is only doing this for internal purposes and it doesn't own that declaration, and that declaration is a block scoped variable of a const, this makes some consumers 😢.

Ideally the loader would use "lib": [ "webworker" ] or would just declare the variable not in the global type scope.

Package Version: 0.2.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions