Skip to content

Instantly share code, notes, and snippets.

@prohazko2
Last active March 3, 2021 19:27
Show Gist options
  • Save prohazko2/dda0e6d6108db3e2dce435e6133432ff to your computer and use it in GitHub Desktop.
Save prohazko2/dda0e6d6108db3e2dce435e6133432ff to your computer and use it in GitHub Desktop.
Rightech IoT handler global var
declare var ric: {
events: {
gen<T>(event: string, payload?: T): void;
};
base64: {
decode(payload: string): DataView;
};
localStore: {
forObject: RicLocalStore;
forHandler: RicLocalStore;
};
};
type RicLocalStore<U = unknown> = {
initWith<T = U>(initial: T): RicLocalStore<T>;
reduce<T = U>(reducer: (prev: T) => T, initial?: T): T;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment