From c451284d846b6248f8b5ddc272f0ed411767d2f4 Mon Sep 17 00:00:00 2001 From: Aya Morisawa Date: Tue, 1 Sep 2015 22:54:26 +0900 Subject: [PATCH] Add ski.d.ts --- ski/ski-tests.ts | 9 +++++++++ ski/ski.d.ts | 10 ++++++++++ 2 files changed, 19 insertions(+) create mode 100644 ski/ski-tests.ts create mode 100644 ski/ski.d.ts diff --git a/ski/ski-tests.ts b/ski/ski-tests.ts new file mode 100644 index 000000000..73b8b4392 --- /dev/null +++ b/ski/ski-tests.ts @@ -0,0 +1,9 @@ +/// + +import { S, K, I } from 'ski'; + +var foo: string = S(a => b => a + b, a => a.split('').reverse().join(''), 'bar'); // barrab + +var foo: string = K('bar')(); // bar + +var foo: string = I('bar'); // bar diff --git a/ski/ski.d.ts b/ski/ski.d.ts new file mode 100644 index 000000000..dba4b9840 --- /dev/null +++ b/ski/ski.d.ts @@ -0,0 +1,10 @@ +// Type definitions for ski 1.1.0 +// Project: https://github.com/jden/ski +// Definitions by: Aya Morisawa +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module "ski" { + export function S(x: (z: U) => (y: S) => T, y: (z: U) => S, z: U): T; + export function K(x: T): (y?: S) => T + export function I(x: T): T; +}