@imput/youtubei.js
Version:
A JavaScript client for YouTube's private API, known as InnerTube. Fork of youtubei.js
27 lines (26 loc) • 869 B
TypeScript
import type { ICacheConstructor } from './Cache.js';
export type Runtime = 'deno' | 'node' | 'browser' | 'cf-worker' | 'unknown' | 'react-native';
export type FetchFunction = typeof fetch;
export type VMPrimative = string | number | boolean | null | undefined;
interface PlatformShim {
runtime: Runtime;
info: {
version: string;
bugs_url: string;
repo_url: string;
};
server: boolean;
Cache: ICacheConstructor;
sha1Hash(data: string): Promise<string>;
uuidv4(): string;
eval(code: string, env: Record<string, VMPrimative>): unknown;
fetch: FetchFunction;
Request: typeof Request;
Response: typeof Response;
Headers: typeof Headers;
FormData: typeof FormData;
File: typeof File;
ReadableStream: typeof ReadableStream;
CustomEvent: typeof CustomEvent;
}
export default PlatformShim;