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>
-
AsyncFunction
,GeneratorFunction
andAsyncGeneratorFunction
constructors. - Addtional useful type utilites.
Copyright (c) Simon Lecoq <@lowlighter>. (MIT License)
https://github.com/lowlighter/libs/blob/main/LICENSE