// ets_tracing: off import type { Effect } from "../Effect/index.js" import type { Sync } from "../Sync/index.js" import type { UnifiableIndexed } from "./index.js" export const unifyIndex = Symbol() export type unifyIndex = typeof unifyIndex export type UnifiableIndexedURI = keyof UnifiableIndexed export interface Unifiable { Sync: [X] extends [Sync] ? Sync : never Effect: [X] extends [Effect] ? [X] extends [Sync] ? never : Effect : never Unify: [X] extends [{ readonly [unifyIndex]: infer K }] ? K extends UnifiableIndexedURI ? UnifiableIndexed[K] : never : never } export type Unify = Unifiable[keyof Unifiable] extends never ? X : Unifiable[keyof Unifiable]