Type alias AddOrReplaceId<T, N, ID>

AddOrReplaceId<T, N, ID>: Omit<T, N> & { [ K in N]: ID }

AddOrReplaceId is the result type of adding or replacing a key in a NameToSignalId.

AddOrReplaceId<{ a: EventId<number> }, 'a', EventId<string> -> { a: EventId<string> }
AddOrReplaceId<{ a: EventId<number> }, 'b', EventId<string> -> { a: EventId<number>; b: EventId<string> }

Type Parameters

  • T extends NameToSignalId

    concrete NameToSignalIds

  • N extends keyof T

    string key

  • ID extends SignalId<any>

    concrete SignalId

Generated using TypeDoc