{
  "id": "@typed/fx/Fx#repeat",
  "canonicalId": "@typed/fx/Fx#repeat",
  "symbol": {
    "id": "@typed/fx/Fx#repeat",
    "packageName": "@typed/fx",
    "moduleName": "Fx",
    "exportName": "repeat",
    "kind": "constant",
    "signatures": [
      "export declare const repeat: {\n    <X, E2, R2>(schedule: Schedule.Schedule<X, void, E2, R2>): <A, E, R>(self: Fx<A, E, R>) => Fx<A, E | E2, R | R2>;\n    <A, E, R, X, E2, R2>(self: Fx<A, E, R>, schedule: Schedule.Schedule<X, void, E2, R2>): Fx<A, E | E2, R | R2>;\n};"
    ],
    "summary": "Repeats the entire stream according to `schedule` after each successful\ncompletion. Failures are not repeated.\n\n`Schedule.recurs(n)` runs the stream `n + 1` times (the original plus `n`\nrepeats), matching Effect `Stream.repeat`.",
    "sections": {
      "Why": "Repetition is a subscription-level decision: after one producer completes,\na Schedule decides whether and when a fresh run should begin. Keeping that\ndecision in Effect's Schedule preserves typed timing services and failures.",
      "Ownership and lifetime": "Runs are strictly sequential. Every source value is forwarded before the\nSchedule is stepped with `void`; a successful step sleeps as configured and\nstarts a new source run. A source failure stops immediately and is never\nrepeated. Schedule failure is forwarded; Schedule completion ends normally.\nInterruption cancels the active source or schedule sleep. No runs overlap."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Schedule } from \"effect\"\nimport { repeat } from \"@typed/fx/Fx\"\nimport { succeed } from \"@typed/fx/Fx\"\n\nconst threeTicks = repeat(succeed(\"tick\"), Schedule.recurs(2))"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/fx/src/Fx/combinators/repeat.ts",
      "line": 44
    },
    "since": "1.0.0",
    "category": "Time and rate"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/fx/Fx#repeat",
    "packageName": "@typed/fx",
    "packageVersion": "2.0.0-beta.7",
    "moduleName": "Fx",
    "consumerSpecifier": "@typed/fx/Fx",
    "exportName": "repeat",
    "qualifiedName": "repeat",
    "declarationKey": "declaration:842255042831b572082d992d",
    "family": "variable",
    "signatures": [
      "export declare const repeat: {\n    <X, E2, R2>(schedule: Schedule.Schedule<X, void, E2, R2>): <A, E, R>(self: Fx<A, E, R>) => Fx<A, E | E2, R | R2>;\n    <A, E, R, X, E2, R2>(self: Fx<A, E, R>, schedule: Schedule.Schedule<X, void, E2, R2>): Fx<A, E | E2, R | R2>;\n};"
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Fx/combinators/repeat.ts",
        "start": {
          "line": 44,
          "column": 14
        },
        "end": {
          "line": 87,
          "column": 2
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/repeat.ts",
        "start": {
          "line": 45,
          "column": 3
        },
        "end": {
          "line": 47,
          "column": 60
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/repeat.ts",
        "start": {
          "line": 48,
          "column": 3
        },
        "end": {
          "line": 51,
          "column": 28
        }
      }
    ],
    "aliases": [
      "@typed/fx#Fx.repeat"
    ],
    "isAlias": false,
    "static": false
  },
  "declaration": {
    "declarationKey": "declaration:842255042831b572082d992d",
    "name": "repeat",
    "family": "variable",
    "facets": [
      {
        "family": "variable",
        "syntaxKind": "VariableDeclaration",
        "signatures": [
          "export declare const repeat: {\n    <X, E2, R2>(schedule: Schedule.Schedule<X, void, E2, R2>): <A, E, R>(self: Fx<A, E, R>) => Fx<A, E | E2, R | R2>;\n    <A, E, R, X, E2, R2>(self: Fx<A, E, R>, schedule: Schedule.Schedule<X, void, E2, R2>): Fx<A, E | E2, R | R2>;\n};"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Fx/combinators/repeat.ts",
            "start": {
              "line": 44,
              "column": 14
            },
            "end": {
              "line": 87,
              "column": 2
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      },
      {
        "family": "call-signature",
        "syntaxKind": "CallSignature",
        "signatures": [
          "<X, E2, R2>(schedule: Schedule.Schedule<X, void, E2, R2>): <A, E, R>(self: Fx<A, E, R>) => Fx<A, E | E2, R | R2>;",
          "<A, E, R, X, E2, R2>(self: Fx<A, E, R>, schedule: Schedule.Schedule<X, void, E2, R2>): Fx<A, E | E2, R | R2>;"
        ],
        "typeParameters": [
          "X",
          "E2",
          "R2",
          "A",
          "E",
          "R"
        ],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Fx/combinators/repeat.ts",
            "start": {
              "line": 45,
              "column": 3
            },
            "end": {
              "line": 47,
              "column": 60
            }
          },
          {
            "file": "packages/fx/src/Fx/combinators/repeat.ts",
            "start": {
              "line": 48,
              "column": 3
            },
            "end": {
              "line": 51,
              "column": 28
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare const repeat: {\n    <X, E2, R2>(schedule: Schedule.Schedule<X, void, E2, R2>): <A, E, R>(self: Fx<A, E, R>) => Fx<A, E | E2, R | R2>;\n    <A, E, R, X, E2, R2>(self: Fx<A, E, R>, schedule: Schedule.Schedule<X, void, E2, R2>): Fx<A, E | E2, R | R2>;\n};"
    ],
    "typeParameters": [
      "X",
      "E2",
      "R2",
      "A",
      "E",
      "R"
    ],
    "summary": "Repeats the entire stream according to `schedule` after each successful\ncompletion. Failures are not repeated.\n\n`Schedule.recurs(n)` runs the stream `n + 1` times (the original plus `n`\nrepeats), matching Effect `Stream.repeat`.",
    "sections": {
      "Why": "Repetition is a subscription-level decision: after one producer completes,\na Schedule decides whether and when a fresh run should begin. Keeping that\ndecision in Effect's Schedule preserves typed timing services and failures.",
      "Ownership and lifetime": "Runs are strictly sequential. Every source value is forwarded before the\nSchedule is stepped with `void`; a successful step sleeps as configured and\nstarts a new source run. A source failure stops immediately and is never\nrepeated. Schedule failure is forwarded; Schedule completion ends normally.\nInterruption cancels the active source or schedule sleep. No runs overlap."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Schedule } from \"effect\"\nimport { repeat } from \"@typed/fx/Fx\"\nimport { succeed } from \"@typed/fx/Fx\"\n\nconst threeTicks = repeat(succeed(\"tick\"), Schedule.recurs(2))"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Fx/combinators/repeat.ts",
        "start": {
          "line": 44,
          "column": 14
        },
        "end": {
          "line": 87,
          "column": 2
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/repeat.ts",
        "start": {
          "line": 45,
          "column": 3
        },
        "end": {
          "line": 47,
          "column": 60
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/repeat.ts",
        "start": {
          "line": 48,
          "column": 3
        },
        "end": {
          "line": 51,
          "column": 28
        }
      }
    ],
    "since": "1.0.0",
    "category": "Time and rate"
  }
}
