{
  "id": "@typed/navigation/memory#MemoryOptions",
  "canonicalId": "@typed/navigation#MemoryOptions",
  "symbol": {
    "id": "@typed/navigation/memory#MemoryOptions",
    "packageName": "@typed/navigation",
    "moduleName": "memory",
    "exportName": "MemoryOptions",
    "kind": "interface",
    "signatures": [
      "export interface MemoryOptions {\n    readonly entries: ReadonlyArray<Destination>;\n    readonly origin?: string | undefined;\n    readonly base?: string | undefined;\n    readonly currentIndex?: number | undefined;\n    readonly maxEntries?: number | undefined;\n    readonly commit?: (before: BeforeNavigationEvent, runHandlers: (destination: Destination) => Effect.Effect<void>) => Effect.Effect<Destination, NavigationError>;\n}"
    ],
    "summary": "Configures an in-memory navigation provider from already committed entries.",
    "sections": {
      "Why": "SSR, tests, and non-browser runtimes need deterministic history without emulating `window`.\n`maxEntries` bounds retained history; pushing after traversal truncates forward entries. `entries`\nmust be non-empty, `maxEntries` must be greater than zero, and `currentIndex` must address an entry\nthat survives the initial tail-retention transform. When `entries.length > maxEntries`, that means\n`currentIndex >= entries.length - maxEntries`. The provider currently trusts these invariants:\nviolating them can produce a negative transformed index and an undefined `currentEntry`. Despite\nits name, `maxEntries: 0` currently retains every entry because `slice(-0)` is `slice(0)`. Prefer\n{@link initialMemory} when starting from a URL rather than a prebuilt history snapshot.",
      "Ownership and lifetime": "The Layer retains the supplied `entries` array as its initial snapshot; it does not clone it.\nCallers must treat that array and its destinations as immutable. Later transitions install new\narrays in the provider RefSubject. A custom `commit` function is retained for the service lifetime.",
      "Property: base": "The structural base path exposed by the active provider.",
      "Property: base: Why": "Routers can establish a stable mount root separately from the changing current URL.",
      "Property: base: Ownership and lifetime": "The string is read when the Layer is acquired and retained on the Navigation service.",
      "Property: commit": "The backend hook that commits a prepared memory transition.",
      "Property: commit: Why": "Advanced providers can preserve the shared state machine while controlling persistence and handler timing.",
      "Property: commit: Ownership and lifetime": "The provider retains the function for its service lifetime and invokes its returned Effect once\nper commit. Resources acquired by that Effect follow the active navigation fiber and its Scope.",
      "Property: currentIndex": "The zero-based active position before initial tail retention.",
      "Property: currentIndex: Why": "SSR snapshots and tests can restore traversal position instead of assuming the last entry, but\nthe selected entry must remain inside the retained tail.",
      "Property: currentIndex: Ownership and lifetime": "The index is read during Layer acquisition. It must address `entries` and, when\n`entries.length > maxEntries`, satisfy `currentIndex >= entries.length - maxEntries`. The\nretention transform subtracts the evicted prefix length; violating this precondition produces a\nnegative index and leaves `currentEntry` undefined. No runtime validation is currently performed.",
      "Property: entries": "The initial committed history snapshot in traversal order.",
      "Property: entries: Why": "Back, forward, and keyed traversal need an explicit history model before retention is applied.",
      "Property: entries: Ownership and lifetime": "The Layer retains this array by reference as the first history snapshot. Do not mutate it after\nLayer acquisition; later provider updates replace the array rather than taking ownership of caller mutation.",
      "Property: maxEntries": "The positive maximum number of history entries retained by the provider.",
      "Property: maxEntries: Why": "A positive bound makes eviction deterministic: the provider keeps the newest tail and adjusts\nthe active index by the number of evicted entries.",
      "Property: maxEntries: Ownership and lifetime": "The number is captured by the RefSubject transformation for the Navigation service lifetime and\nmust be greater than zero. No validation enforces that contract. `0` currently retains all\nentries because JavaScript evaluates `slice(-0)` as `slice(0)`; it is not a zero-capacity mode.",
      "Property: origin": "The absolute origin used to resolve relative destinations.",
      "Property: origin: Why": "A single origin makes same-document classification and URL normalization consistent across providers.",
      "Property: origin: Ownership and lifetime": "The string is read when the Layer is acquired and retained on the Navigation service."
    },
    "examples": [],
    "relations": [],
    "source": {
      "file": "packages/navigation/src/memory.ts",
      "line": 33
    },
    "since": "1.0.0",
    "category": "Memory history configuration"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/navigation/memory#MemoryOptions",
    "packageName": "@typed/navigation",
    "packageVersion": "1.0.0-beta.7",
    "moduleName": "memory",
    "consumerSpecifier": "@typed/navigation/memory",
    "exportName": "MemoryOptions",
    "qualifiedName": "MemoryOptions",
    "declarationKey": "declaration:c853cee3597d1765f36da629",
    "family": "interface",
    "signatures": [
      "export interface MemoryOptions {\n    readonly entries: ReadonlyArray<Destination>;\n    readonly origin?: string | undefined;\n    readonly base?: string | undefined;\n    readonly currentIndex?: number | undefined;\n    readonly maxEntries?: number | undefined;\n    readonly commit?: (before: BeforeNavigationEvent, runHandlers: (destination: Destination) => Effect.Effect<void>) => Effect.Effect<Destination, NavigationError>;\n}"
    ],
    "sourceSpans": [
      {
        "file": "packages/navigation/src/memory.ts",
        "start": {
          "line": 33,
          "column": 1
        },
        "end": {
          "line": 131,
          "column": 2
        }
      },
      {
        "file": "packages/navigation/src/memory.ts",
        "start": {
          "line": 76,
          "column": 3
        },
        "end": {
          "line": 76,
          "column": 38
        }
      },
      {
        "file": "packages/navigation/src/memory.ts",
        "start": {
          "line": 127,
          "column": 3
        },
        "end": {
          "line": 130,
          "column": 52
        }
      },
      {
        "file": "packages/navigation/src/memory.ts",
        "start": {
          "line": 94,
          "column": 3
        },
        "end": {
          "line": 94,
          "column": 46
        }
      },
      {
        "file": "packages/navigation/src/memory.ts",
        "start": {
          "line": 48,
          "column": 3
        },
        "end": {
          "line": 48,
          "column": 48
        }
      },
      {
        "file": "packages/navigation/src/memory.ts",
        "start": {
          "line": 111,
          "column": 3
        },
        "end": {
          "line": 111,
          "column": 44
        }
      },
      {
        "file": "packages/navigation/src/memory.ts",
        "start": {
          "line": 62,
          "column": 3
        },
        "end": {
          "line": 62,
          "column": 40
        }
      }
    ],
    "aliases": [
      "@typed/navigation#MemoryOptions"
    ],
    "isAlias": false,
    "static": false
  },
  "declaration": {
    "declarationKey": "declaration:c853cee3597d1765f36da629",
    "name": "MemoryOptions",
    "family": "interface",
    "facets": [
      {
        "family": "interface",
        "syntaxKind": "InterfaceDeclaration",
        "signatures": [
          "export interface MemoryOptions {\n    readonly entries: ReadonlyArray<Destination>;\n    readonly origin?: string | undefined;\n    readonly base?: string | undefined;\n    readonly currentIndex?: number | undefined;\n    readonly maxEntries?: number | undefined;\n    readonly commit?: (before: BeforeNavigationEvent, runHandlers: (destination: Destination) => Effect.Effect<void>) => Effect.Effect<Destination, NavigationError>;\n}"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/navigation/src/memory.ts",
            "start": {
              "line": 33,
              "column": 1
            },
            "end": {
              "line": 131,
              "column": 2
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      },
      {
        "family": "property",
        "syntaxKind": "PropertySignature",
        "signatures": [
          "readonly base?: string | undefined;"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/navigation/src/memory.ts",
            "start": {
              "line": 76,
              "column": 3
            },
            "end": {
              "line": 76,
              "column": 38
            }
          }
        ],
        "static": false,
        "readonly": true,
        "optional": true
      },
      {
        "family": "property",
        "syntaxKind": "PropertySignature",
        "signatures": [
          "readonly commit?: (before: BeforeNavigationEvent, runHandlers: (destination: Destination) => Effect.Effect<void>) => Effect.Effect<Destination, NavigationError>;"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/navigation/src/memory.ts",
            "start": {
              "line": 127,
              "column": 3
            },
            "end": {
              "line": 130,
              "column": 52
            }
          }
        ],
        "static": false,
        "readonly": true,
        "optional": true
      },
      {
        "family": "property",
        "syntaxKind": "PropertySignature",
        "signatures": [
          "readonly currentIndex?: number | undefined;"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/navigation/src/memory.ts",
            "start": {
              "line": 94,
              "column": 3
            },
            "end": {
              "line": 94,
              "column": 46
            }
          }
        ],
        "static": false,
        "readonly": true,
        "optional": true
      },
      {
        "family": "property",
        "syntaxKind": "PropertySignature",
        "signatures": [
          "readonly entries: ReadonlyArray<Destination>;"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/navigation/src/memory.ts",
            "start": {
              "line": 48,
              "column": 3
            },
            "end": {
              "line": 48,
              "column": 48
            }
          }
        ],
        "static": false,
        "readonly": true,
        "optional": false
      },
      {
        "family": "property",
        "syntaxKind": "PropertySignature",
        "signatures": [
          "readonly maxEntries?: number | undefined;"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/navigation/src/memory.ts",
            "start": {
              "line": 111,
              "column": 3
            },
            "end": {
              "line": 111,
              "column": 44
            }
          }
        ],
        "static": false,
        "readonly": true,
        "optional": true
      },
      {
        "family": "property",
        "syntaxKind": "PropertySignature",
        "signatures": [
          "readonly origin?: string | undefined;"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/navigation/src/memory.ts",
            "start": {
              "line": 62,
              "column": 3
            },
            "end": {
              "line": 62,
              "column": 40
            }
          }
        ],
        "static": false,
        "readonly": true,
        "optional": true
      }
    ],
    "signatures": [
      "export interface MemoryOptions {\n    readonly entries: ReadonlyArray<Destination>;\n    readonly origin?: string | undefined;\n    readonly base?: string | undefined;\n    readonly currentIndex?: number | undefined;\n    readonly maxEntries?: number | undefined;\n    readonly commit?: (before: BeforeNavigationEvent, runHandlers: (destination: Destination) => Effect.Effect<void>) => Effect.Effect<Destination, NavigationError>;\n}"
    ],
    "typeParameters": [],
    "summary": "Configures an in-memory navigation provider from already committed entries.",
    "sections": {
      "Why": "SSR, tests, and non-browser runtimes need deterministic history without emulating `window`.\n`maxEntries` bounds retained history; pushing after traversal truncates forward entries. `entries`\nmust be non-empty, `maxEntries` must be greater than zero, and `currentIndex` must address an entry\nthat survives the initial tail-retention transform. When `entries.length > maxEntries`, that means\n`currentIndex >= entries.length - maxEntries`. The provider currently trusts these invariants:\nviolating them can produce a negative transformed index and an undefined `currentEntry`. Despite\nits name, `maxEntries: 0` currently retains every entry because `slice(-0)` is `slice(0)`. Prefer\n{@link initialMemory} when starting from a URL rather than a prebuilt history snapshot.",
      "Ownership and lifetime": "The Layer retains the supplied `entries` array as its initial snapshot; it does not clone it.\nCallers must treat that array and its destinations as immutable. Later transitions install new\narrays in the provider RefSubject. A custom `commit` function is retained for the service lifetime.",
      "Property: base": "The structural base path exposed by the active provider.",
      "Property: base: Why": "Routers can establish a stable mount root separately from the changing current URL.",
      "Property: base: Ownership and lifetime": "The string is read when the Layer is acquired and retained on the Navigation service.",
      "Property: commit": "The backend hook that commits a prepared memory transition.",
      "Property: commit: Why": "Advanced providers can preserve the shared state machine while controlling persistence and handler timing.",
      "Property: commit: Ownership and lifetime": "The provider retains the function for its service lifetime and invokes its returned Effect once\nper commit. Resources acquired by that Effect follow the active navigation fiber and its Scope.",
      "Property: currentIndex": "The zero-based active position before initial tail retention.",
      "Property: currentIndex: Why": "SSR snapshots and tests can restore traversal position instead of assuming the last entry, but\nthe selected entry must remain inside the retained tail.",
      "Property: currentIndex: Ownership and lifetime": "The index is read during Layer acquisition. It must address `entries` and, when\n`entries.length > maxEntries`, satisfy `currentIndex >= entries.length - maxEntries`. The\nretention transform subtracts the evicted prefix length; violating this precondition produces a\nnegative index and leaves `currentEntry` undefined. No runtime validation is currently performed.",
      "Property: entries": "The initial committed history snapshot in traversal order.",
      "Property: entries: Why": "Back, forward, and keyed traversal need an explicit history model before retention is applied.",
      "Property: entries: Ownership and lifetime": "The Layer retains this array by reference as the first history snapshot. Do not mutate it after\nLayer acquisition; later provider updates replace the array rather than taking ownership of caller mutation.",
      "Property: maxEntries": "The positive maximum number of history entries retained by the provider.",
      "Property: maxEntries: Why": "A positive bound makes eviction deterministic: the provider keeps the newest tail and adjusts\nthe active index by the number of evicted entries.",
      "Property: maxEntries: Ownership and lifetime": "The number is captured by the RefSubject transformation for the Navigation service lifetime and\nmust be greater than zero. No validation enforces that contract. `0` currently retains all\nentries because JavaScript evaluates `slice(-0)` as `slice(0)`; it is not a zero-capacity mode.",
      "Property: origin": "The absolute origin used to resolve relative destinations.",
      "Property: origin: Why": "A single origin makes same-document classification and URL normalization consistent across providers.",
      "Property: origin: Ownership and lifetime": "The string is read when the Layer is acquired and retained on the Navigation service."
    },
    "examples": [],
    "sourceSpans": [
      {
        "file": "packages/navigation/src/memory.ts",
        "start": {
          "line": 33,
          "column": 1
        },
        "end": {
          "line": 131,
          "column": 2
        }
      },
      {
        "file": "packages/navigation/src/memory.ts",
        "start": {
          "line": 76,
          "column": 3
        },
        "end": {
          "line": 76,
          "column": 38
        }
      },
      {
        "file": "packages/navigation/src/memory.ts",
        "start": {
          "line": 127,
          "column": 3
        },
        "end": {
          "line": 130,
          "column": 52
        }
      },
      {
        "file": "packages/navigation/src/memory.ts",
        "start": {
          "line": 94,
          "column": 3
        },
        "end": {
          "line": 94,
          "column": 46
        }
      },
      {
        "file": "packages/navigation/src/memory.ts",
        "start": {
          "line": 48,
          "column": 3
        },
        "end": {
          "line": 48,
          "column": 48
        }
      },
      {
        "file": "packages/navigation/src/memory.ts",
        "start": {
          "line": 111,
          "column": 3
        },
        "end": {
          "line": 111,
          "column": 44
        }
      },
      {
        "file": "packages/navigation/src/memory.ts",
        "start": {
          "line": 62,
          "column": 3
        },
        "end": {
          "line": 62,
          "column": 40
        }
      }
    ],
    "since": "1.0.0",
    "category": "Memory history configuration"
  }
}
