Skip to main content

Built and signed on GitHub Actions

🏷️ Collection of TypeScript types.

This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
100%
Published
3 weeks ago (0.3.3)
type alias AwaitableGenerator

Union of AsyncGenerator and Generator.

Examples

Example 1

const generator: AwaitableGenerator<number> = (function* () {
	yield 13;
})();
export const asyncGenerator: AwaitableGenerator<number> = (async function* () {
	yield 13;
})();

Type Parameters

Item = unknown

Type of the items in the AwaitableGenerator.

Return = unknown

Type of the return value in the AwaitableGenerator.

Next = unknown

Type of the next value in the AwaitableGenerator.

Definition

Add Package

deno add jsr:@coven/types

Import symbol

import { type AwaitableGenerator } from "@coven/types";

---- OR ----

Import directly with a jsr specifier

import { type AwaitableGenerator } from "jsr:@coven/types";

Add Package

npx jsr add @coven/types

Import symbol

import { type AwaitableGenerator } from "@coven/types";

Add Package

yarn dlx jsr add @coven/types

Import symbol

import { type AwaitableGenerator } from "@coven/types";

Add Package

pnpm dlx jsr add @coven/types

Import symbol

import { type AwaitableGenerator } from "@coven/types";

Add Package

bunx jsr add @coven/types

Import symbol

import { type AwaitableGenerator } from "@coven/types";