import type { UseKind } from '@variance-authority/package/help'; export declare const USE_KINDS: readonly UseKind[]; export declare const THROUGH: readonly [undefined, 'dynamic', 'namespace']; /** The generation a published store belongs to, read off its head. */ export interface StoreHead { /** The workspace root the value was read from. */ readonly root: string; /** Repository root every recorded file is relative to. */ readonly graphRoot: string; readonly graphDigest: string; readonly generatedAt: string; /** * When the read behind the value began, before any of it was read: a file * written before this is in the value, and one written after it may not be. A * refresh of listed files keeps the time of the read it refreshed, because it * read nothing else, so a file it listed counts as written after. `generatedAt` * is taken after the read, so it says neither. */ readonly readStartedAt: string; /** The export list as a set, as `encodeHelpStore` states it. */ readonly exportedDigest: string; /** The index manifest the value was refreshed from; absent when it was read another way. */ readonly indexDigest?: string; /** The package manifests the value was joined against, as `packagesDigest` states them. */ readonly packagesDigest?: string; } /** * The fields `head` holds, in its order. `forwardsDigest` is a slot no store * writes any more, kept so a store of this version still opens. */ declare const HEAD_FIELDS: readonly ['root', 'graphRoot', 'graphDigest', 'generatedAt', 'readStartedAt', 'exportedDigest', 'forwardsDigest', 'indexDigest', 'packagesDigest']; export type HeadFields = Partial>; export declare function generationOf(fields: HeadFields): StoreHead | undefined; /** A store's head as {@link storeHeadOf} reads it, with the length of the store it heads. */ export interface HeadRead { /** The generation the head states; absent for a store encoded in memory, which carries none. */ readonly head: StoreHead | undefined; /** The bytes the store's header declares: a file of any other length is not the store that head belongs to. */ readonly length: number; } /** * The head the store `bytes` starts with. `bytes` may be the store's first * bytes alone: a read past them throws `SegmentCutShort` with the length that * holds the head, so a caller asking whether a store is current reads no more * of it. */ export declare function storeHeadOf(bytes: Uint8Array): HeadRead; /** The sections of one store, read in place, with the string pool every row refers to. */ export interface Sections { readonly fields: HeadFields; readonly bytesOf: (name: string) => Buffer; readonly u32: (name: string) => Uint32Array; /** The pooled string `id` names. */ readonly string: (id: number) => string; /** The same, absent for an id that names none. */ readonly maybe: (id: number | undefined) => string | undefined; /** The rows `key` owns, read off an offset column. */ readonly slice: (off: Uint32Array, rows: Uint32Array, key: number) => Uint32Array; } /** The sections of one store, read in place. Throws on anything that is not this format and version. */ export declare function sectionsOf(bytes: Uint8Array): Sections; export {}; //# sourceMappingURL=store-layout.d.ts.map