1
0
Fork 0
mirror of https://github.com/demostf/demo.js synced 2026-06-04 00:54:14 +02:00

remove old typings

This commit is contained in:
Robin Appelman 2019-02-23 20:28:03 +01:00
commit 423178da03
7 changed files with 0 additions and 286 deletions

View file

@ -1,230 +0,0 @@
// Generated by typings
// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/1a428e1fdb71c76e88da0b27f5a9df1e96294001/mocha/index.d.ts
interface MochaSetupOptions {
//milliseconds to wait before considering a test slow
slow?: number;
// timeout in milliseconds
timeout?: number;
// ui name "bdd", "tdd", "exports" etc
ui?: string;
//array of accepted globals
globals?: any[];
// reporter instance (function or string), defaults to `mocha.reporters.Spec`
reporter?: any;
// bail on the first test failure
bail?: boolean;
// ignore global leaks
ignoreLeaks?: boolean;
// grep string or regexp to filter tests with
grep?: any;
}
declare var mocha: Mocha;
declare var describe: Mocha.IContextDefinition;
declare var xdescribe: Mocha.IContextDefinition;
// alias for `describe`
declare var context: Mocha.IContextDefinition;
// alias for `describe`
declare var suite: Mocha.IContextDefinition;
declare var it: Mocha.ITestDefinition;
declare var xit: Mocha.ITestDefinition;
// alias for `it`
declare var test: Mocha.ITestDefinition;
declare var specify: Mocha.ITestDefinition;
// Used with the --delay flag; see https://mochajs.org/#hooks
declare function run(): void;
interface MochaDone {
(error?: any): any;
}
declare function setup(callback: (this: Mocha.IBeforeAndAfterContext, done: MochaDone) => any): void;
declare function teardown(callback: (this: Mocha.IBeforeAndAfterContext, done: MochaDone) => any): void;
declare function suiteSetup(callback: (this: Mocha.IHookCallbackContext, done: MochaDone) => any): void;
declare function suiteTeardown(callback: (this: Mocha.IHookCallbackContext, done: MochaDone) => any): void;
declare function before(callback: (this: Mocha.IHookCallbackContext, done: MochaDone) => any): void;
declare function before(description: string, callback: (this: Mocha.IHookCallbackContext, done: MochaDone) => any): void;
declare function after(callback: (this: Mocha.IHookCallbackContext, done: MochaDone) => any): void;
declare function after(description: string, callback: (this: Mocha.IHookCallbackContext, done: MochaDone) => any): void;
declare function beforeEach(callback: (this: Mocha.IBeforeAndAfterContext, done: MochaDone) => any): void;
declare function beforeEach(description: string, callback: (this: Mocha.IBeforeAndAfterContext, done: MochaDone) => any): void;
declare function afterEach(callback: (this: Mocha.IBeforeAndAfterContext, done: MochaDone) => any): void;
declare function afterEach(description: string, callback: (this: Mocha.IBeforeAndAfterContext, done: MochaDone) => any): void;
declare class Mocha {
currentTest: Mocha.ITestDefinition;
constructor(options?: {
grep?: RegExp;
ui?: string;
reporter?: string;
timeout?: number;
reporterOptions?: any;
slow?: number;
bail?: boolean;
});
/** Setup mocha with the given options. */
setup(options: MochaSetupOptions): Mocha;
bail(value?: boolean): Mocha;
addFile(file: string): Mocha;
/** Sets reporter by name, defaults to "spec". */
reporter(name: string): Mocha;
/** Sets reporter constructor, defaults to mocha.reporters.Spec. */
reporter(reporter: (runner: Mocha.IRunner, options: any) => any): Mocha;
ui(value: string): Mocha;
grep(value: string): Mocha;
grep(value: RegExp): Mocha;
invert(): Mocha;
ignoreLeaks(value: boolean): Mocha;
checkLeaks(): Mocha;
/**
* Function to allow assertion libraries to throw errors directly into mocha.
* This is useful when running tests in a browser because window.onerror will
* only receive the 'message' attribute of the Error.
*/
throwError(error: Error): void;
/** Enables growl support. */
growl(): Mocha;
globals(value: string): Mocha;
globals(values: string[]): Mocha;
useColors(value: boolean): Mocha;
useInlineDiffs(value: boolean): Mocha;
timeout(value: number): Mocha;
slow(value: number): Mocha;
enableTimeouts(value: boolean): Mocha;
asyncOnly(value: boolean): Mocha;
noHighlighting(value: boolean): Mocha;
/** Runs tests and invokes `onComplete()` when finished. */
run(onComplete?: (failures: number) => void): Mocha.IRunner;
}
// merge the Mocha class declaration with a module
declare namespace Mocha {
interface ISuiteCallbackContext {
timeout(ms: number): void;
retries(n: number): void;
slow(ms: number): void;
}
interface IHookCallbackContext {
skip(): void;
timeout(ms: number): void;
[index: string]: any;
}
interface ITestCallbackContext {
skip(): void;
timeout(ms: number): void;
retries(n: number): void;
slow(ms: number): void;
[index: string]: any;
}
/** Partial interface for Mocha's `Runnable` class. */
interface IRunnable {
title: string;
fn: Function;
async: boolean;
sync: boolean;
timedOut: boolean;
}
/** Partial interface for Mocha's `Suite` class. */
interface ISuite {
parent: ISuite;
title: string;
fullTitle(): string;
}
/** Partial interface for Mocha's `Test` class. */
interface ITest extends IRunnable {
parent: ISuite;
pending: boolean;
state: 'failed'|'passed'|undefined;
fullTitle(): string;
}
interface IBeforeAndAfterContext extends IHookCallbackContext {
currentTest: ITest;
}
/** Partial interface for Mocha's `Runner` class. */
interface IRunner { }
interface IContextDefinition {
(description: string, callback: (this: ISuiteCallbackContext) => void): ISuite;
only(description: string, callback: (this: ISuiteCallbackContext) => void): ISuite;
skip(description: string, callback: (this: ISuiteCallbackContext) => void): void;
timeout(ms: number): void;
}
interface ITestDefinition {
(expectation: string, callback?: (this: ITestCallbackContext, done: MochaDone) => any): ITest;
only(expectation: string, callback?: (this: ITestCallbackContext, done: MochaDone) => any): ITest;
skip(expectation: string, callback?: (this: ITestCallbackContext, done: MochaDone) => any): void;
timeout(ms: number): void;
state: "failed" | "passed";
}
export module reporters {
export class Base {
stats: {
suites: number;
tests: number;
passes: number;
pending: number;
failures: number;
};
constructor(runner: IRunner);
}
export class Doc extends Base { }
export class Dot extends Base { }
export class HTML extends Base { }
export class HTMLCov extends Base { }
export class JSON extends Base { }
export class JSONCov extends Base { }
export class JSONStream extends Base { }
export class Landing extends Base { }
export class List extends Base { }
export class Markdown extends Base { }
export class Min extends Base { }
export class Nyan extends Base { }
export class Progress extends Base {
/**
* @param options.open String used to indicate the start of the progress bar.
* @param options.complete String used to indicate a complete test on the progress bar.
* @param options.incomplete String used to indicate an incomplete test on the progress bar.
* @param options.close String used to indicate the end of the progress bar.
*/
constructor(runner: IRunner, options?: {
open?: string;
complete?: string;
incomplete?: string;
close?: string;
});
}
export class Spec extends Base { }
export class TAP extends Base { }
export class XUnit extends Base {
constructor(runner: IRunner, options?: any);
}
}
}
declare module "mocha" {
export = Mocha;
}

View file

@ -1,8 +0,0 @@
{
"resolution": "main",
"tree": {
"src": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/1a428e1fdb71c76e88da0b27f5a9df1e96294001/mocha/index.d.ts",
"raw": "registry:dt/mocha#2.2.5+20170204022515",
"typings": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/1a428e1fdb71c76e88da0b27f5a9df1e96294001/mocha/index.d.ts"
}
}

2
typings/index.d.ts vendored
View file

@ -1,2 +0,0 @@
/// <reference path="globals/mocha/index.d.ts" />
/// <reference path="modules/clone/index.d.ts" />

View file

@ -1,28 +0,0 @@
// Generated by typings
// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/337587de8c13868283993bfacdcdd1a0f3291e7f/clone/index.d.ts
declare module 'clone' {
// Type definitions for clone 0.1.11
// Project: https://github.com/pvorb/node-clone
// Definitions by: Kieran Simpson <https://github.com/kierans/DefinitelyTyped>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* See clone JS source for API docs
*/
/**
* @param val the value that you want to clone, any type allowed
* @param circular Call clone with circular set to false if you are certain that obj contains no circular references. This will give better performance if needed. There is no error if undefined or null is passed as obj.
* @param depth to wich the object is to be cloned (optional, defaults to infinity)
*/
function clone<T>(val: T, circular?: boolean, depth?: number): T;
namespace clone {
/**
* @param obj the object that you want to clone
*/
function clonePrototype<T>(obj: T): T;
}
export = clone
}

View file

@ -1,8 +0,0 @@
{
"resolution": "main",
"tree": {
"src": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/337587de8c13868283993bfacdcdd1a0f3291e7f/clone/index.d.ts",
"raw": "registry:dt/clone#0.1.11+20160428043022",
"typings": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/337587de8c13868283993bfacdcdd1a0f3291e7f/clone/index.d.ts"
}
}

View file

@ -1,5 +0,0 @@
declare module 'snappyjs' {
export function uncompress(input: Uint8Array): Uint8Array;
export function compress(input: Uint8Array): Uint8Array;
}

View file

@ -1,5 +0,0 @@
declare module 'typedarray-to-buffer' {
function toBuffer(typedArray:Uint8Array):ArrayBuffer;
export = toBuffer
}