{
  "id": "@typed/fx/Fx#periodic",
  "canonicalId": "@typed/fx/Fx#periodic",
  "symbol": {
    "id": "@typed/fx/Fx#periodic",
    "packageName": "@typed/fx",
    "moduleName": "Fx",
    "exportName": "periodic",
    "kind": "constant",
    "signatures": [
      "export declare const periodic: (period: Duration.Input) => Fx<void>;"
    ],
    "summary": "Creates an Fx that emits a `void` value periodically.",
    "sections": {
      "Why": "Common interval work can use Effect's\n[Schedule](https://effect.website/docs/v4/api/effect/Schedule) clock and\ninterruption semantics rather than an unmanaged platform timer.",
      "Ownership and lifetime": "Construction starts no clock. A run waits `period` before the first emission and\nagain between every subsequent emission. The run fiber owns the schedule; no ticks\ncontinue after interruption."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect, Fiber } from \"effect\"\nimport * as TestClock from \"effect/testing/TestClock\"\nimport { collectUpTo, periodic } from \"@typed/fx/Fx\"\n\nconst program = Effect.gen(function* () {\n  const fiber = yield* Effect.forkChild(collectUpTo(periodic(\"1 second\"), 1))\n  yield* TestClock.adjust(\"999 millis\")\n  const beforeFirstPeriod = fiber.pollUnsafe()\n  yield* TestClock.adjust(\"1 millis\")\n  const firstTick = yield* Fiber.join(fiber)\n  return { beforeFirstPeriod, firstTick }\n})"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/fx/src/Fx/constructors/periodic.ts",
      "line": 43
    },
    "since": "1.0.0",
    "category": "Time and rate"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/fx/Fx#periodic",
    "packageName": "@typed/fx",
    "packageVersion": "2.0.0-beta.13",
    "moduleName": "Fx",
    "consumerSpecifier": "@typed/fx/Fx",
    "exportName": "periodic",
    "qualifiedName": "periodic",
    "declarationKey": "declaration:9aa2b14d4d8b0ffce9e36535",
    "family": "variable",
    "signatures": [
      "export declare const periodic: (period: Duration.Input) => Fx<void>;"
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Fx/constructors/periodic.ts",
        "start": {
          "line": 43,
          "column": 14
        },
        "end": {
          "line": 44,
          "column": 45
        }
      }
    ],
    "aliases": [
      "@typed/fx#Fx.periodic"
    ],
    "isAlias": false,
    "static": false
  },
  "declaration": {
    "declarationKey": "declaration:9aa2b14d4d8b0ffce9e36535",
    "name": "periodic",
    "family": "variable",
    "facets": [
      {
        "family": "variable",
        "syntaxKind": "VariableDeclaration",
        "signatures": [
          "export declare const periodic: (period: Duration.Input) => Fx<void>;"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Fx/constructors/periodic.ts",
            "start": {
              "line": 43,
              "column": 14
            },
            "end": {
              "line": 44,
              "column": 45
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare const periodic: (period: Duration.Input) => Fx<void>;"
    ],
    "typeParameters": [],
    "summary": "Creates an Fx that emits a `void` value periodically.",
    "sections": {
      "Why": "Common interval work can use Effect's\n[Schedule](https://effect.website/docs/v4/api/effect/Schedule) clock and\ninterruption semantics rather than an unmanaged platform timer.",
      "Ownership and lifetime": "Construction starts no clock. A run waits `period` before the first emission and\nagain between every subsequent emission. The run fiber owns the schedule; no ticks\ncontinue after interruption."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect, Fiber } from \"effect\"\nimport * as TestClock from \"effect/testing/TestClock\"\nimport { collectUpTo, periodic } from \"@typed/fx/Fx\"\n\nconst program = Effect.gen(function* () {\n  const fiber = yield* Effect.forkChild(collectUpTo(periodic(\"1 second\"), 1))\n  yield* TestClock.adjust(\"999 millis\")\n  const beforeFirstPeriod = fiber.pollUnsafe()\n  yield* TestClock.adjust(\"1 millis\")\n  const firstTick = yield* Fiber.join(fiber)\n  return { beforeFirstPeriod, firstTick }\n})"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Fx/constructors/periodic.ts",
        "start": {
          "line": 43,
          "column": 14
        },
        "end": {
          "line": 44,
          "column": 45
        }
      }
    ],
    "since": "1.0.0",
    "category": "Time and rate"
  }
}
