Skip to main content

Built and signed on GitHub Actions

Works with
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 Score100%
Downloads103/wk
Published5 months ago (4.0.1)

🗃️ Utility types

🗃️ Utility types

JSR JSR Score NPM Coverage

📑 Examples

import type { Arg, Arrayable, Nullable, Promisable } from "./types.ts"

function foo(_: unknown, args: Arrayable<string>): Promisable<Nullable<string>> {
  return Promise.resolve(null)
}

// Get the type of arguments[1] of `foo` function
type args = Arg<typeof foo, 1>

✨ Features

  • AsyncFunction, GeneratorFunction and AsyncGeneratorFunction constructors.
  • Addtional useful type utilites.

📜 License

Copyright (c) Simon Lecoq <@lowlighter>. (MIT License)
https://github.com/lowlighter/libs/blob/main/LICENSE
Built and signed on
GitHub Actions

Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@libs/typing

Import symbol

import * as typing from "@libs/typing";
or

Import directly with a jsr specifier

import * as typing from "jsr:@libs/typing";