-
Notifications
You must be signed in to change notification settings - Fork 35
/
index.d.ts
32 lines (23 loc) · 881 Bytes
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/// <reference types="cheerio" />
/// <reference types="react" />
declare module 'riteway' {
export function Try<U extends any[], V>(fn: (...args: U) => V, ...args: U): any | Promise<any>
export function createStream(opts: CreateStreamOptions): ReadableStream
export const describe: DescribeFunction;
interface DescribeFunction {
(unit: string, testFunction: TestFunction): Promise<void>
only: (unit: string, testFunction: TestFunction) => Promise<void>
skip: (unit: string, testFunction: TestFunction) => Promise<void>
}
type assert = <T>(assertion: Assertion<T>) => void
type TestFunction = (assert: assert, end?: Function) => Promise<void>
interface Assertion<T> {
readonly given: any
readonly should: string
readonly actual: T
readonly expected: T
}
interface CreateStreamOptions {
readonly objectMode: boolean
}
}