@types/compose-function
TypeScript icon, indicating that this package has built-in type declarations

0.0.33 • Public • Published

Installation

npm install --save @types/compose-function

Summary

This package contains type definitions for compose-function (https://github.com/stoeffel/compose-function).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/compose-function.

index.d.ts

// Hardcoded signatures for 2-4 parameters
declare function f<A, B, C>(
    f1: (b: B) => C,
    f2: (a: A) => B,
): (a: A) => C;
declare function f<A, B, C, D>(
    f1: (b: C) => D,
    f2: (a: B) => C,
    f3: (a: A) => B,
): (a: A) => D;
declare function f<A, B, C, D, E>(
    f1: (b: D) => E,
    f2: (a: C) => D,
    f3: (a: B) => C,
    f4: (a: A) => B,
): (a: A) => E;

// Minimal typing for more than 4 parameters
declare function f<Result>(
    f1: (a: any) => Result,
    ...functions: Function[]
): (a: any) => Result;

export = f;

Additional Details

  • Last updated: Mon, 06 Nov 2023 22:41:05 GMT
  • Dependencies: none

Credits

These definitions were written by Denis Sokolov.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/compose-function

Weekly Downloads

13,703

Version

0.0.33

License

MIT

Unpacked Size

3.7 kB

Total Files

5

Last publish

Collaborators

  • types