DamonOehlman / detect-browser

Unpack a browser type and version from the useragent string
MIT License
687 stars 102 forks source link

Fix #123 import node types for build only #171

Closed vilicvane closed 2 years ago

vilicvane commented 2 years ago

Use import in a d.ts file to reference node types, so that it is included only during build.

vilicvane commented 2 years ago

Requires manual polyfill for NodeJS.Platform, closing for now. Anyone needs this can use @vilic/detect-browser with:

declare namespace NodeJS {
  type Platform = never;
}