Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

383 B
Raw Blame
/** Flattens merged object types
 * @example
 * Flatten<{ x: string } & { y: string }> = { x: string; y: string }
 **/
export type FlattenObject<T> = T extends infer O
  ? { [K in keyof O]: O[K] }
  : never;

/** Flattens the array type to extract the inner type, otherwise returns the type itself
 * @example
 * FlattenArray<string[]> = string
 * FlattenArray<string> = string
 **/