detect-platform.d.ts 748 B

123456789101112131415
  1. export declare const isRunningInBrowser: () => boolean;
  2. type Arch = 'x32' | 'x64' | 'arm' | 'arm64' | `other:${string}` | 'unknown';
  3. type PlatformName = 'MacOS' | 'Linux' | 'Windows' | 'FreeBSD' | 'OpenBSD' | 'iOS' | 'Android' | `Other:${string}` | 'Unknown';
  4. type Browser = 'ie' | 'edge' | 'chrome' | 'firefox' | 'safari';
  5. type PlatformProperties = {
  6. 'X-Stainless-Lang': 'js';
  7. 'X-Stainless-Package-Version': string;
  8. 'X-Stainless-OS': PlatformName;
  9. 'X-Stainless-Arch': Arch;
  10. 'X-Stainless-Runtime': 'node' | 'deno' | 'edge' | `browser:${Browser}` | 'unknown';
  11. 'X-Stainless-Runtime-Version': string;
  12. };
  13. export declare const getPlatformHeaders: () => PlatformProperties;
  14. export {};
  15. //# sourceMappingURL=detect-platform.d.ts.map