{
  "id": "@typed/async-data#Optimistic",
  "canonicalId": "@typed/async-data#Optimistic",
  "symbol": {
    "id": "@typed/async-data#Optimistic",
    "packageName": "@typed/async-data",
    "moduleName": ".",
    "exportName": "Optimistic",
    "kind": "interface",
    "signatures": [
      "export interface Optimistic<A, E> {\n    readonly _tag: \"Optimistic\";\n    readonly value: A;\n    readonly previous: AsyncData<A, E>;\n}"
    ],
    "summary": "Represents an optimistic value together with the exact state it replaced.",
    "sections": {
      "Why": "Preserving history makes rollback and nested optimistic transformations explicit rather than hiding them in renderer state.",
      "Ownership and lifetime": "This plain wrapper acquires no resources and retains its previous state; `readonly` is compile-time only.",
      "Property: _tag": "The discriminant for optimistic state.",
      "Property: _tag: Why": "The literal tag enables explicit optimistic handling and cycle-safe traversal.",
      "Property: _tag: Ownership and lifetime": "Inherits the resource-free lifetime of its enclosing state.",
      "Property: previous": "The state to restore or inspect beneath this optimistic layer.",
      "Property: previous: Why": "Explicit history supports deterministic rollback and transformation of nested optimistic states.",
      "Property: previous: Ownership and lifetime": "Inherits the enclosing optimistic wrapper's resource-free lifetime.",
      "Property: value": "The value currently presented optimistically.",
      "Property: value: Why": "Separating the provisional value from history makes pending intent directly observable.",
      "Property: value: Ownership and lifetime": "Inherits the enclosing state's lifetime; the caller retains ownership of the referenced value."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { optimistic, success } from \"@typed/async-data\"\nconst state = optimistic(success(1), 2)"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/async-data/src/index.ts",
      "line": 242
    },
    "since": "1.0.0",
    "category": "State models"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/async-data#Optimistic",
    "packageName": "@typed/async-data",
    "packageVersion": "1.0.0-beta.7",
    "moduleName": ".",
    "consumerSpecifier": "@typed/async-data",
    "exportName": "Optimistic",
    "qualifiedName": "Optimistic",
    "declarationKey": "declaration:77786ac74eb4d1371368a5ed",
    "family": "interface",
    "signatures": [
      "export interface Optimistic<A, E> {\n    readonly _tag: \"Optimistic\";\n    readonly value: A;\n    readonly previous: AsyncData<A, E>;\n}"
    ],
    "sourceSpans": [
      {
        "file": "packages/async-data/src/index.ts",
        "start": {
          "line": 242,
          "column": 1
        },
        "end": {
          "line": 276,
          "column": 2
        }
      },
      {
        "file": "packages/async-data/src/index.ts",
        "start": {
          "line": 253,
          "column": 3
        },
        "end": {
          "line": 253,
          "column": 31
        }
      },
      {
        "file": "packages/async-data/src/index.ts",
        "start": {
          "line": 275,
          "column": 3
        },
        "end": {
          "line": 275,
          "column": 38
        }
      },
      {
        "file": "packages/async-data/src/index.ts",
        "start": {
          "line": 264,
          "column": 3
        },
        "end": {
          "line": 264,
          "column": 21
        }
      }
    ],
    "aliases": [],
    "isAlias": false,
    "static": false
  },
  "declaration": {
    "declarationKey": "declaration:77786ac74eb4d1371368a5ed",
    "name": "Optimistic",
    "family": "interface",
    "facets": [
      {
        "family": "interface",
        "syntaxKind": "InterfaceDeclaration",
        "signatures": [
          "export interface Optimistic<A, E> {\n    readonly _tag: \"Optimistic\";\n    readonly value: A;\n    readonly previous: AsyncData<A, E>;\n}"
        ],
        "typeParameters": [
          "A",
          "E"
        ],
        "sourceSpans": [
          {
            "file": "packages/async-data/src/index.ts",
            "start": {
              "line": 242,
              "column": 1
            },
            "end": {
              "line": 276,
              "column": 2
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      },
      {
        "family": "property",
        "syntaxKind": "PropertySignature",
        "signatures": [
          "readonly _tag: \"Optimistic\";"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/async-data/src/index.ts",
            "start": {
              "line": 253,
              "column": 3
            },
            "end": {
              "line": 253,
              "column": 31
            }
          }
        ],
        "static": false,
        "readonly": true,
        "optional": false
      },
      {
        "family": "property",
        "syntaxKind": "PropertySignature",
        "signatures": [
          "readonly previous: AsyncData<A, E>;"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/async-data/src/index.ts",
            "start": {
              "line": 275,
              "column": 3
            },
            "end": {
              "line": 275,
              "column": 38
            }
          }
        ],
        "static": false,
        "readonly": true,
        "optional": false
      },
      {
        "family": "property",
        "syntaxKind": "PropertySignature",
        "signatures": [
          "readonly value: A;"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/async-data/src/index.ts",
            "start": {
              "line": 264,
              "column": 3
            },
            "end": {
              "line": 264,
              "column": 21
            }
          }
        ],
        "static": false,
        "readonly": true,
        "optional": false
      }
    ],
    "signatures": [
      "export interface Optimistic<A, E> {\n    readonly _tag: \"Optimistic\";\n    readonly value: A;\n    readonly previous: AsyncData<A, E>;\n}"
    ],
    "typeParameters": [
      "A",
      "E"
    ],
    "summary": "Represents an optimistic value together with the exact state it replaced.",
    "sections": {
      "Why": "Preserving history makes rollback and nested optimistic transformations explicit rather than hiding them in renderer state.",
      "Ownership and lifetime": "This plain wrapper acquires no resources and retains its previous state; `readonly` is compile-time only.",
      "Property: _tag": "The discriminant for optimistic state.",
      "Property: _tag: Why": "The literal tag enables explicit optimistic handling and cycle-safe traversal.",
      "Property: _tag: Ownership and lifetime": "Inherits the resource-free lifetime of its enclosing state.",
      "Property: previous": "The state to restore or inspect beneath this optimistic layer.",
      "Property: previous: Why": "Explicit history supports deterministic rollback and transformation of nested optimistic states.",
      "Property: previous: Ownership and lifetime": "Inherits the enclosing optimistic wrapper's resource-free lifetime.",
      "Property: value": "The value currently presented optimistically.",
      "Property: value: Why": "Separating the provisional value from history makes pending intent directly observable.",
      "Property: value: Ownership and lifetime": "Inherits the enclosing state's lifetime; the caller retains ownership of the referenced value."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { optimistic, success } from \"@typed/async-data\"\nconst state = optimistic(success(1), 2)"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/async-data/src/index.ts",
        "start": {
          "line": 242,
          "column": 1
        },
        "end": {
          "line": 276,
          "column": 2
        }
      },
      {
        "file": "packages/async-data/src/index.ts",
        "start": {
          "line": 253,
          "column": 3
        },
        "end": {
          "line": 253,
          "column": 31
        }
      },
      {
        "file": "packages/async-data/src/index.ts",
        "start": {
          "line": 275,
          "column": 3
        },
        "end": {
          "line": 275,
          "column": 38
        }
      },
      {
        "file": "packages/async-data/src/index.ts",
        "start": {
          "line": 264,
          "column": 3
        },
        "end": {
          "line": 264,
          "column": 21
        }
      }
    ],
    "since": "1.0.0",
    "category": "State models"
  }
}
