Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add TS types
  • Loading branch information
Andarist authored and staltz committed Feb 8, 2019
1 parent 7221089 commit 404a8f1
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -7,6 +7,7 @@
"url": "git+https://github.com/staltz/callbag-pipe.git"
},
"main": "readme.js",
"types": "types.d.ts",
"scripts": {
"test": "tape test.js"
},
Expand Down
71 changes: 71 additions & 0 deletions types.d.ts
@@ -0,0 +1,71 @@
declare function pipe<T1, T2>(first: T1, second: (a: T1) => T2): T2
declare function pipe<T1, T2, T3>(
first: T1,
second: (a: T1) => T2,
third: (a: T2) => T3,
): T3
declare function pipe<T1, T2, T3, T4>(
first: T1,
second: (a: T1) => T2,
third: (a: T2) => T3,
fourth: (a: T3) => T4,
): T4
declare function pipe<T1, T2, T3, T4, T5>(
first: T1,
second: (a: T1) => T2,
third: (a: T2) => T3,
fourth: (a: T3) => T4,
fifth: (a: T4) => T5,
): T5
declare function pipe<T1, T2, T3, T4, T5, T6>(
first: T1,
second: (a: T1) => T2,
third: (a: T2) => T3,
fourth: (a: T3) => T4,
fifth: (a: T4) => T5,
sixth: (a: T5) => T6,
): T6
declare function pipe<T1, T2, T3, T4, T5, T6, T7>(
first: T1,
second: (a: T1) => T2,
third: (a: T2) => T3,
fourth: (a: T3) => T4,
fifth: (a: T4) => T5,
sixth: (a: T5) => T6,
seventh: (a: T6) => T7,
): T7
declare function pipe<T1, T2, T3, T4, T5, T6, T7, T8>(
first: T1,
second: (a: T1) => T2,
third: (a: T2) => T3,
fourth: (a: T3) => T4,
fifth: (a: T4) => T5,
sixth: (a: T5) => T6,
seventh: (a: T6) => T7,
eigth: (a: T7) => T8,
): T8
declare function pipe<T1, T2, T3, T4, T5, T6, T7, T8, T9>(
first: T1,
second: (a: T1) => T2,
third: (a: T2) => T3,
fourth: (a: T3) => T4,
fifth: (a: T4) => T5,
sixth: (a: T5) => T6,
seventh: (a: T6) => T7,
eigth: (a: T7) => T8,
ninth: (a: T8) => T9,
): T9
declare function pipe<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(
first: T1,
second: (a: T1) => T2,
third: (a: T2) => T3,
fourth: (a: T3) => T4,
fifth: (a: T4) => T5,
sixth: (a: T5) => T6,
seventh: (a: T6) => T7,
eigth: (a: T7) => T8,
ninth: (a: T8) => T9,
tenth: (a: T9) => T10,
): T10

export default pipe

0 comments on commit 404a8f1

Please sign in to comment.