microsoft/vscode-react-native

Public

mirrored from https://github.com/microsoft/vscode-react-nativeAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
0.5.1

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

src/typings/should/should.d.ts

170lines · modeblame

bdad2966Joshua Skelton10 years ago1// Type definitions for should.js v8.1.1
2// Project: https://github.com/shouldjs/should.js
3// Definitions by: Alex Varju <https://github.com/varju/>, Maxime LUCE <https://github.com/SomaticIT/>
4// Definitions: https://github.com/borisyankov/DefinitelyTyped
5
6interface Object {
7should: ShouldAssertion;
8}
9
10interface ShouldAssertion {
11// basic grammar
12a: ShouldAssertion;
13an: ShouldAssertion;
14and: ShouldAssertion;
15be: ShouldAssertion;
16has: ShouldAssertion;
17have: ShouldAssertion;
18is: ShouldAssertion;
19it: ShouldAssertion;
20with: ShouldAssertion;
21which: ShouldAssertion;
22the: ShouldAssertion;
23of: ShouldAssertion;
24not: ShouldAssertion;
25
26// validators
27arguments(): ShouldAssertion;
28empty(): ShouldAssertion;
29ok(): ShouldAssertion;
30true(): ShouldAssertion;
31false(): ShouldAssertion;
32NaN(): ShouldAssertion;
33Infinity(): ShouldAssertion;
34Array(): ShouldAssertion;
35Object(): ShouldAssertion;
36String(): ShouldAssertion;
37Boolean(): ShouldAssertion;
38Number(): ShouldAssertion;
39Error(): ShouldAssertion;
40Function(): ShouldAssertion;
41Date(): ShouldAssertion;
42Class(): ShouldAssertion;
43generator(): ShouldAssertion;
44iterable(): ShouldAssertion;
45iterator(): ShouldAssertion;
46eql(expected: any, description?: string): ShouldAssertion;
47equal(expected: any, description?: string): ShouldAssertion;
48equalOneOf(...values: any[]): ShouldAssertion;
49within(start: number, finish: number, description?: string): ShouldAssertion;
50approximately(value: number, delta: number, description?: string): ShouldAssertion;
51type(expected: any, description?: string): ShouldAssertion;
52instanceof(constructor: Function, description?: string): ShouldAssertion;
53above(n: number, description?: string): ShouldAssertion;
54below(n: number, description?: string): ShouldAssertion;
55aboveOrEqual(n: number, description?: string): ShouldAssertion;
56greaterThanOrEqual(n: number, description?: string): ShouldAssertion;
57belowOrEqual(n: number, description?: string): ShouldAssertion;
58lessThanOrEqual(n: number, description?: string): ShouldAssertion;
59match(other: {}, description?: string): ShouldAssertion;
60match(other: (val: any) => any, description?: string): ShouldAssertion;
61match(regexp: RegExp, description?: string): ShouldAssertion;
62match(other: any, description?: string): ShouldAssertion;
63matchEach(other: {}, description?: string): ShouldAssertion;
64matchEach(other: (val: any) => any, description?: string): ShouldAssertion;
65matchEach(regexp: RegExp, description?: string): ShouldAssertion;
66matchEach(other: any, description?: string): ShouldAssertion;
67matchAny(other: {}, description?: string): ShouldAssertion;
68matchAny(other: (val: any) => any, description?: string): ShouldAssertion;
69matchAny(regexp: RegExp, description?: string): ShouldAssertion;
70matchAny(other: any, description?: string): ShouldAssertion;
71length(n: number, description?: string): ShouldAssertion;
72property(name: string, description?: string): ShouldAssertion;
73property(name: string, val: any, description?: string): ShouldAssertion;
74properties(names: string[]): ShouldAssertion;
75properties(name: string): ShouldAssertion;
76properties(descriptor: any): ShouldAssertion;
77properties(...properties: string[]): ShouldAssertion;
78propertyByPath(...properties: string[]): ShouldAssertion;
79propertyWithDescriptor(name: string, descriptor: PropertyDescriptor): ShouldAssertion;
80oneOf(...values: any[]): ShouldAssertion;
81ownProperty(name: string, description?: string): ShouldAssertion;
82containEql(obj: any): ShouldAssertion;
83containDeep(obj: any): ShouldAssertion;
84containDeepOrdered(obj: any): ShouldAssertion;
85keys(...allKeys: string[]): ShouldAssertion;
86keys(allKeys: string[]): ShouldAssertion;
87enumerable(property: string, value?: any): ShouldAssertion;
88enumerables(...properties: string[]): ShouldAssertion;
89startWith(expected: string, message?: any): ShouldAssertion;
90endWith(expected: string, message?: any): ShouldAssertion;
91throw(message?: any): ShouldAssertion;
92
93//http
94header(field: string, val?: string): ShouldAssertion;
95status(code: number): ShouldAssertion;
96json(): ShouldAssertion;
97html(): ShouldAssertion;
98
99//stubs
100alwaysCalledOn(thisTarget: any): ShouldAssertion;
101alwaysCalledWith(...arguments: any[]): ShouldAssertion;
102alwaysCalledWithExactly(...arguments: any[]): ShouldAssertion;
103alwaysCalledWithMatch(...arguments: any[]): ShouldAssertion;
104alwaysCalledWithNew(): ShouldAssertion;
105alwaysThrew(exception?: any): ShouldAssertion;
106callCount(count: number): ShouldAssertion;
107called(): ShouldAssertion;
108calledOn(thisTarget: any): ShouldAssertion;
109calledOnce(): ShouldAssertion;
110calledTwice(): ShouldAssertion;
111calledThrice(): ShouldAssertion;
112calledWith(...arguments: any[]): ShouldAssertion;
113calledWithExactly(...arguments: any[]): ShouldAssertion;
114calledWithMatch(...arguments: any[]): ShouldAssertion;
115calledWithNew(): ShouldAssertion;
116neverCalledWith(...arguments: any[]): ShouldAssertion;
117neverCalledWithMatch(...arguments: any[]): ShouldAssertion;
118threw(exception?: any): ShouldAssertion;
119
120// aliases
121True(): ShouldAssertion;
122False(): ShouldAssertion;
123Arguments(): ShouldAssertion;
124class(): ShouldAssertion;
125deepEqual(expected: any, description?: string): ShouldAssertion;
126exactly(expected: any, description?: string): ShouldAssertion;
127instanceOf(constructor: Function, description?: string): ShouldAssertion;
128throwError(message?: any): ShouldAssertion;
129lengthOf(n: number, description?: string): ShouldAssertion;
130key(key: string): ShouldAssertion;
131hasOwnProperty(name: string, description?: string): ShouldAssertion;
132greaterThan(n: number, description?: string): ShouldAssertion;
133lessThan(n: number, description?: string): ShouldAssertion;
134}
135
136interface ShouldInternal {
137// should.js's extras
138exist(actual: any, msg?: string): void;
139exists(actual: any, msg?: string): void;
140not: ShouldInternal;
141}
142
143interface Internal extends ShouldInternal {
144(obj: any): ShouldAssertion;
145
146// node.js's assert functions
147fail(actual: any, expected: any, message: string, operator: string): void;
148assert(value: any, message: string): void;
149ok(value: any, message?: string): void;
150equal(actual: any, expected: any, message?: string): void;
151notEqual(actual: any, expected: any, message?: string): void;
152deepEqual(actual: any, expected: any, message?: string): void;
153notDeepEqual(actual: any, expected: any, message?: string): void;
154strictEqual(actual: any, expected: any, message?: string): void;
155notStrictEqual(actual: any, expected: any, message?: string): void;
156throws(block: any, error?: any, message?: string): void;
157doesNotThrow(block: any, message?: string): void;
158ifError(value: any): void;
159inspect(value: any, obj: any): any;
160}
161
162declare var should: Internal;
163declare var Should: Internal;
164interface Window {
165Should: Internal;
166}
167
168declare module "should" {
169export = should;
170}