UNPKG

@empathyco/x-components

Version:
25 lines (15 loc) 743 B
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [MutationsDictionary](./x-components.mutationsdictionary.md) ## MutationsDictionary type Util type for being used on generic constraints which will only accept an object containing mutations. **Signature:** ```typescript export type MutationsDictionary<Mutations> = Record<keyof Mutations, (payload?: any) => void>; ``` ## Example Example constraint ```typescript // This function allows receiving any object who only contains mutations; function sampleFunction\<Mutations extends MutationsDictionary\<Mutations\>\> (mutations: Mutations): void; ```