Closed j-khong closed 3 years ago
following this PR https://github.com/TheRealNate/meteor-react-native/issues/13
i've just made a quick meteorrn-core.d.ts file in order to remove all the red in my vscode window
feel free to correct/update it
declare module '@meteorrn/core' { function connect(endpoint: string, options?: any): void; function disconnect(): void; function reconnect(): void; type Status = 'change' | 'connected' | 'disconnected' | 'loggingIn' | 'change'; function call(...args: any[]): void; function status(): { connected: boolean; status: Status; }; interface Data { getUrl(): string; waitDdpReady(cb: (...args: any[]) => void): void; onChange(cb: (...args: any[]) => void): void; offChange(cb: (...args: any[]) => void): void; on(eventName: string, cb: (...args: any[]) => void): void; off(eventName: string, cb: (...args: any[]) => void): void; waitDdpConnected(cb: (...args: any[]) => void): void; } function getData(): Data; }
Hey @j-khong, this is really helpful! Would you like to open a PR to make sure you get properly credited?
see https://github.com/TheRealNate/meteor-react-native/pull/47
following this PR https://github.com/TheRealNate/meteor-react-native/issues/13
i've just made a quick meteorrn-core.d.ts file in order to remove all the red in my vscode window
feel free to correct/update it