UNPKG

@donverduyn/react-runtime

Version:
26 lines (25 loc) 1.11 kB
import type { Tagged } from 'type-fest'; import type { DeclarationId, ProviderId, RegisterId, ResolvedProviderEntry, RuntimeContext } from '@/types'; import type { EdgeDataFields } from '@/utils/hash'; import type { PropService } from 'utils/effect'; export type DryRunCandidateId = Tagged<string, 'DryRunCandidate'>; export type DryRunCandidateBase = { id: DryRunCandidateId; depth: number; self: EdgeDataFields; firstDescendent: EdgeDataFields | null; }; export type DryRunCandidateDto = DryRunCandidateBase & { ancestors: RegisterId[]; }; export type DryRunCandidate = DryRunCandidateBase & { ancestors: DryRunCandidateAncestor[]; }; export type DryRunCandidateAncestor = { id: RegisterId; declId: DeclarationId; props: Record<string, unknown>; upstreamModules: Map<ProviderId, Set<RuntimeContext<any, never, PropService>>>; localProviders: ResolvedProviderEntry<any, any, unknown>[]; }; export declare const createDryRunCandidateDto: (self: EdgeDataFields, firstDescendent: EdgeDataFields | null, depth: number, ancestors: RegisterId[]) => DryRunCandidateDto;