public array<P extends Path<NotNul<T>>, Key extends string>(
  name: P,
  ...args: NotNul<PathValue<NotNul<T>, P>> extends Array<infer Item> ? ('id' extends keyof Item ? [keyname: Key] : [keyName?: Key]) : []
): NotNul<PathValue<NotNul<T>, P>> extends Array<infer Item>
  ? Key extends keyof Item
    ? never
    : Field<Array<Item & (Key extends keyof Item ? {} : string extends Key ? {} : { [P in Key]?: string })>>
  : never {
  return this.createField(name as any, this.name, args[0]) as any
}
By Anonymous, 2022-01-10 03:36:55