Skip to content

Instantly share code, notes, and snippets.

@j-
Created May 25, 2018 07:10
Show Gist options
  • Save j-/d6e8560fd54f509be814fe129be28fe0 to your computer and use it in GitHub Desktop.
Save j-/d6e8560fd54f509be814fe129be28fe0 to your computer and use it in GitHub Desktop.
/**
* @example
*
* export interface ActionReceiveChatActionParticipantJoined extends Action {
* type: 'ReceiveChatActionParticipantJoined';
* data: {
* sessionId: string;
* result: string;
* entities: EntityMap<{
* actions: ChatActionParticipantJoined;
* participants: ChatParticipant;
* }>;
* };
* }
*
*/
export type EntityMap<T> = {
[K in keyof T]: {
[id: string]: T[K];
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment