@lowlighter/typing

3.1.1 • Public • Published

🧰 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

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
3.1.157latest

Version History

VersionDownloads (Last 7 Days)Published
3.1.157
3.1.00
3.0.00
2.9.00
2.8.20
2.8.10
2.8.00
2.7.00
2.6.10
2.6.00
2.5.00
2.4.00
2.3.10
2.3.00
2.2.00
2.1.10
2.1.00

Package Sidebar

Install

npm i @lowlighter/typing

Weekly Downloads

57

Version

3.1.1

License

MIT

Unpacked Size

14.5 kB

Total Files

15

Last publish

Collaborators

  • lowlighter