env.d.ts 763 B

123456789101112131415161718192021222324
  1. declare global {
  2. const Deno: {
  3. version: {
  4. deno: string;
  5. };
  6. env: {
  7. get: (name: string) => string | undefined;
  8. };
  9. } | undefined;
  10. }
  11. export declare const isBrowser: () => boolean;
  12. export declare const isWebWorker: () => boolean;
  13. export declare const isJsDom: () => boolean;
  14. export declare const isDeno: () => boolean;
  15. export declare const isNode: () => boolean;
  16. export declare const getEnv: () => string;
  17. export type RuntimeEnvironment = {
  18. library: string;
  19. libraryVersion?: string;
  20. runtime: string;
  21. runtimeVersion?: string;
  22. };
  23. export declare function getRuntimeEnvironment(): Promise<RuntimeEnvironment>;
  24. export declare function getEnvironmentVariable(name: string): string | undefined;