/// <reference lib="dom" />
in api-call
package is globally overriding types
#507
Labels
/// <reference lib="dom" />
in api-call
package is globally overriding types
#507
Bug Report
I'm using
@twurple/api
and@twurple/auth
in a Cloudflare Worker. CF Workers provide additional runtime APIs such ascrypto.subtle.timingSafeEqual
so I have to use their library typings to get proper type support for them.The issue is that
/// <reference lib="dom" />
is being used in@twurple/api-call
which is globally overriding the CF Worker types.I've tracked down the two instances where it's being used:
Code
Minimal Reproduction
Steps:
Clone the repo:
Install dependencies:
You can comment in and out line 6:
import { ApiClient } from "@twurple/api";
to see the override occur. If anything is imported from Twurple,crypto.subtle.timingSafeEqual
will show a type error.Actual Behavior
lib.dom.d.ts
is being imported and is globally overriding types.Environment
The text was updated successfully, but these errors were encountered: