export abstract class Provider { public static connectionString: string; public static CurrentConnection: any public static isAuthed: boolean = false public static events_stack: any = [] private static readonly nodePlatform = 'node' private static readonly browserPlatform = 'browser' public static readData(event: string | symbol, listner: (...args: any[]) => void) { Provider.CurrentConnection.once(event, listner) } public static Platform(check: string) { return new Promise((resolve, reject) => { const platform = typeof window === 'undefined' ? Provider.nodePlatform : Provider.browserPlatform if (platform == check) { resolve(true) } else { reject() } }) } } export type ProviderConstructor = { new(connectionString: string): Provider; }