/** * Key that corresponds with a function on the server. * * @semanticType * @semanticTopic identifier * @semanticTopic string * @semanticTopic dereekb-firebase:functions */ export type FirebaseFunctionKey = string; /** * Typings tuple for a FirebaseFunction. Denotes the expected input and output values. */ export type FirebaseFunctionType = [I, O]; /** * An asynchronous function that calls a function on the Firebase server. */ export type FirebaseFunction = (input: I) => Promise; /** * Type with keys corresponding to functions on the corresponding server for a client. */ export type FirebaseFunctionTypeMap = { readonly [key: FirebaseFunctionKey]: FirebaseFunctionType; }; /** * A FirebaseFunction map. Its types are relative to a FirebaseFunctionTypeMap. */ export type FirebaseFunctionMap = { readonly [K in keyof M]: FirebaseFunctionMapFunction; }; /** * Typings for a function within a FirebaseFunctionMap. */ export type FirebaseFunctionMapFunction = FirebaseFunction;