In TypeScript, this type is defined in lib/lib.dom.d.ts and lib/lib.webworker.d.ts.
Maybe the package could be restructured somehow, so that these CDN fetching types are only included when importing the full emojibase package, but not when importing only emojibase-data?
I'm using emojibase-data to generate an emoji picker. This script runs in a NodeJS environment, so the DOM types aren't available.
SInce #139, emojibase-data includes types that extend
RequestInit
. This type is not available in a non-DOM context:In TypeScript, this type is defined in
lib/lib.dom.d.ts
andlib/lib.webworker.d.ts
.Maybe the package could be restructured somehow, so that these CDN fetching types are only included when importing the full
emojibase
package, but not when importing onlyemojibase-data
?