andywer / andywer/threads.js

Dom reference forces consuming package to use dom lib

Aperta
#429 1 commento 1 reazione 0 assegnatari Vedi su GitHub
Lingua principale
TypeScript
Stelle
3.5k
Fork
173
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

This line forces consuming packages to use the dom lib when compiling:
https://github.com/andywer/threads.js/blob/master/src/types/master.ts#L1

This means that the host package can't properly type check for nodejs only. For example, the compiler will not catch if someone tries to use the global `performance` object, which doesn't exist in node.

I believe this is related to https://github.com/andywer/threads.js/issues/418

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.