UNPKG

graphile-build

Version:

Build a GraphQL schema from plugins

12 lines 654 B
export declare const $$arrayHints: unique symbol; export type WithArrayHints<T> = T & { [$$arrayHints]?: string[]; }; /** * Appends the entries from `extra` into `base` tracking the `hint` as to when * they were added. If a conflict is found (where `base` already has an entry * with the same `identity(item)` as a new item) an error will be thrown * describing what happened. */ export default function append<T, ID extends string | number | symbol = string | number | symbol>(base: WithArrayHints<T[]>, extra: WithArrayHints<ReadonlyArray<T>>, getIdentity: keyof T | ((entry: T) => ID), hint: string): T[]; //# sourceMappingURL=append.d.ts.map