tstyche 5.0.0-beta.0 → 5.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/build/4.x/index.d.cts +251 -0
- package/build/4.x/index.d.ts +251 -0
- package/build/index.d.cts +16 -16
- package/build/index.d.ts +16 -16
- package/build/tstyche.d.ts +177 -272
- package/build/tstyche.js +650 -499
- package/package.json +12 -1
package/README.md
CHANGED
|
@@ -65,7 +65,7 @@ test("toMilliseconds", () => {
|
|
|
65
65
|
|
|
66
66
|
Here is the list of all matchers:
|
|
67
67
|
|
|
68
|
-
- `.toBe()`, `.toBeAssignableTo()`, `.
|
|
68
|
+
- `.toBe()`, `.toBeAssignableTo()`, `.toBeAssignableFrom()` compare types or types of expression,
|
|
69
69
|
- `.toAcceptProps()` checks the type of JSX component props,
|
|
70
70
|
- `.toBeApplicable` ensures that the decorator function can be applied,
|
|
71
71
|
- `.toBeCallableWith()` checks whether a function is callable with the given arguments,
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
interface Describe {
|
|
2
|
+
/**
|
|
3
|
+
* Defines a group of tests.
|
|
4
|
+
*
|
|
5
|
+
* @param name - The name of the group.
|
|
6
|
+
* @param callback - The function to create a scope for a group of tests.
|
|
7
|
+
*/
|
|
8
|
+
(name: string, callback: () => void | Promise<void>): void;
|
|
9
|
+
/**
|
|
10
|
+
* Marks a group of tests as focused.
|
|
11
|
+
*
|
|
12
|
+
* @param name - The name of the group.
|
|
13
|
+
* @param callback - The function to create a scope for a group of tests.
|
|
14
|
+
*/
|
|
15
|
+
only: (name: string, callback: () => void | Promise<void>) => void;
|
|
16
|
+
/**
|
|
17
|
+
* Marks a group of tests as skipped.
|
|
18
|
+
*
|
|
19
|
+
* @param name - The name of the group.
|
|
20
|
+
* @param callback - The function to create a scope for a group of tests.
|
|
21
|
+
*/
|
|
22
|
+
skip: (name: string, callback: () => void | Promise<void>) => void;
|
|
23
|
+
/**
|
|
24
|
+
* Marks a group of tests as yet to be implemented.
|
|
25
|
+
*
|
|
26
|
+
* @param name - The name of the group.
|
|
27
|
+
* @param callback - The function to create a scope for a group of tests.
|
|
28
|
+
*/
|
|
29
|
+
todo: (name: string, callback?: () => void | Promise<void>) => void;
|
|
30
|
+
}
|
|
31
|
+
interface Test {
|
|
32
|
+
/**
|
|
33
|
+
* Defines a single test.
|
|
34
|
+
*
|
|
35
|
+
* @param name - The name of the test.
|
|
36
|
+
* @param callback - The function with a code snippet and assertions.
|
|
37
|
+
*/
|
|
38
|
+
(name: string, callback: () => void | Promise<void>): void;
|
|
39
|
+
/**
|
|
40
|
+
* Marks a test as focused.
|
|
41
|
+
*
|
|
42
|
+
* @param name - The name of the test.
|
|
43
|
+
* @param callback - The function with a code snippet and assertions.
|
|
44
|
+
*/
|
|
45
|
+
only: (name: string, callback: () => void | Promise<void>) => void;
|
|
46
|
+
/**
|
|
47
|
+
* Marks a test as skipped.
|
|
48
|
+
*
|
|
49
|
+
* @param name - The name of the test.
|
|
50
|
+
* @param callback - The function with a code snippet and assertions.
|
|
51
|
+
*/
|
|
52
|
+
skip: (name: string, callback: () => void | Promise<void>) => void;
|
|
53
|
+
/**
|
|
54
|
+
* Marks a test as yet to be implemented.
|
|
55
|
+
*
|
|
56
|
+
* @param name - The name of the test.
|
|
57
|
+
* @param callback - The function with a code snippet and assertions.
|
|
58
|
+
*/
|
|
59
|
+
todo: (name: string, callback?: () => void | Promise<void>) => void;
|
|
60
|
+
}
|
|
61
|
+
interface Matchers {
|
|
62
|
+
/**
|
|
63
|
+
* Checks if the JSX component accepts props of the given type.
|
|
64
|
+
*
|
|
65
|
+
* @remarks
|
|
66
|
+
*
|
|
67
|
+
* This is a work in progress feature. Generic components are not yet supported.
|
|
68
|
+
*/
|
|
69
|
+
toAcceptProps: {
|
|
70
|
+
/**
|
|
71
|
+
* Checks if the JSX component accepts props of the given type.
|
|
72
|
+
*
|
|
73
|
+
* @remarks
|
|
74
|
+
*
|
|
75
|
+
* This is a work in progress feature. Generic components are not yet supported.
|
|
76
|
+
*/
|
|
77
|
+
<Target>(): void;
|
|
78
|
+
/**
|
|
79
|
+
* Checks if the JSX component accepts the given props.
|
|
80
|
+
*
|
|
81
|
+
* @remarks
|
|
82
|
+
*
|
|
83
|
+
* This is a work in progress feature. Generic components are not yet supported.
|
|
84
|
+
*/
|
|
85
|
+
(target: unknown): void;
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* Checks if the source type is the same as the target type.
|
|
89
|
+
*/
|
|
90
|
+
toBe: {
|
|
91
|
+
/**
|
|
92
|
+
* Checks if the source type is the same as the target type.
|
|
93
|
+
*/
|
|
94
|
+
<Target>(): void;
|
|
95
|
+
/**
|
|
96
|
+
* Checks if the source type is the same as type of the target expression.
|
|
97
|
+
*/
|
|
98
|
+
(target: unknown): void;
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* Checks if the source type is assignable from the target type.
|
|
102
|
+
*/
|
|
103
|
+
toBeAssignableFrom: {
|
|
104
|
+
/**
|
|
105
|
+
* Checks if the source type is assignable from the target type.
|
|
106
|
+
*/
|
|
107
|
+
<Target>(): void;
|
|
108
|
+
/**
|
|
109
|
+
* Checks if the source type is assignable from type of the target expression.
|
|
110
|
+
*/
|
|
111
|
+
(target: unknown): void;
|
|
112
|
+
};
|
|
113
|
+
/**
|
|
114
|
+
* Checks if the source type is assignable to the target type.
|
|
115
|
+
*/
|
|
116
|
+
toBeAssignableTo: {
|
|
117
|
+
/**
|
|
118
|
+
* Checks if the source type is assignable to the target type.
|
|
119
|
+
*/
|
|
120
|
+
<Target>(): void;
|
|
121
|
+
/**
|
|
122
|
+
* Checks if the source type is assignable to type of the target expression.
|
|
123
|
+
*/
|
|
124
|
+
(target: unknown): void;
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* Checks if the source type is callable with the given arguments.
|
|
128
|
+
*/
|
|
129
|
+
toBeCallableWith: (...args: Array<unknown>) => void;
|
|
130
|
+
/**
|
|
131
|
+
* Checks if the source type is constructable with the given arguments.
|
|
132
|
+
*/
|
|
133
|
+
toBeConstructableWith: (...args: Array<unknown>) => void;
|
|
134
|
+
/**
|
|
135
|
+
* Checks if a property key exists on the source type.
|
|
136
|
+
*/
|
|
137
|
+
toHaveProperty: (key: string | number | symbol) => void;
|
|
138
|
+
/**
|
|
139
|
+
* Checks if the source type raises an error.
|
|
140
|
+
*/
|
|
141
|
+
toRaiseError: (...target: Array<string | number | RegExp>) => void;
|
|
142
|
+
}
|
|
143
|
+
interface Modifier {
|
|
144
|
+
/**
|
|
145
|
+
* Passes the source type to the matcher.
|
|
146
|
+
*/
|
|
147
|
+
type: Matchers & {
|
|
148
|
+
/**
|
|
149
|
+
* Negates the assertion.
|
|
150
|
+
*/
|
|
151
|
+
not: Matchers;
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
interface Expect {
|
|
155
|
+
/**
|
|
156
|
+
* Builds an assertion.
|
|
157
|
+
*
|
|
158
|
+
* @template Source - The type which is checked.
|
|
159
|
+
*/
|
|
160
|
+
<Source>(): Modifier;
|
|
161
|
+
/**
|
|
162
|
+
* Builds an assertion.
|
|
163
|
+
*
|
|
164
|
+
* @param source - The expression whose type is checked.
|
|
165
|
+
*/
|
|
166
|
+
(source: unknown): Modifier;
|
|
167
|
+
/**
|
|
168
|
+
* Marks an assertion as focused.
|
|
169
|
+
*/
|
|
170
|
+
only: {
|
|
171
|
+
/**
|
|
172
|
+
* Marks an assertion as focused.
|
|
173
|
+
*
|
|
174
|
+
* @template Source - The type which is checked.
|
|
175
|
+
*/
|
|
176
|
+
<Source>(): Modifier;
|
|
177
|
+
/**
|
|
178
|
+
* Marks an assertion as focused.
|
|
179
|
+
*
|
|
180
|
+
* @param source - The expression whose type is checked.
|
|
181
|
+
*/
|
|
182
|
+
(source: unknown): Modifier;
|
|
183
|
+
};
|
|
184
|
+
/**
|
|
185
|
+
* Marks an assertion as skipped.
|
|
186
|
+
*/
|
|
187
|
+
skip: {
|
|
188
|
+
/**
|
|
189
|
+
* Marks an assertion as skipped.
|
|
190
|
+
*
|
|
191
|
+
* @template Source - The type which is checked.
|
|
192
|
+
*/
|
|
193
|
+
<Source>(): Modifier;
|
|
194
|
+
/**
|
|
195
|
+
* Marks an assertion as skipped.
|
|
196
|
+
*
|
|
197
|
+
* @param source - The expression whose type is checked.
|
|
198
|
+
*/
|
|
199
|
+
(source: unknown): Modifier;
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Builds an assertion.
|
|
204
|
+
*/
|
|
205
|
+
declare const expect: Expect;
|
|
206
|
+
/**
|
|
207
|
+
* Reshapes type of the given object by removing the specified keys.
|
|
208
|
+
*/
|
|
209
|
+
declare function omit<T, K extends PropertyKey>(object: T, ...keys: [K, ...Array<K>]): Omit<T, K>;
|
|
210
|
+
/**
|
|
211
|
+
* Reshapes type of the given object by keeping only the specified keys.
|
|
212
|
+
*/
|
|
213
|
+
declare function pick<T, K extends keyof T>(object: T, ...keys: [K, ...Array<K>]): Pick<T, K>;
|
|
214
|
+
/**
|
|
215
|
+
* Defines a test group.
|
|
216
|
+
*/
|
|
217
|
+
declare const describe: Describe;
|
|
218
|
+
/**
|
|
219
|
+
* Defines a single test.
|
|
220
|
+
*/
|
|
221
|
+
declare const test: Test;
|
|
222
|
+
/**
|
|
223
|
+
* Defines a single test.
|
|
224
|
+
*/
|
|
225
|
+
declare const it: Test;
|
|
226
|
+
interface Actions {
|
|
227
|
+
/**
|
|
228
|
+
* Calls the given function with the provided arguments.
|
|
229
|
+
*/
|
|
230
|
+
isCalledWith: (...args: Array<unknown>) => void;
|
|
231
|
+
}
|
|
232
|
+
interface When {
|
|
233
|
+
/**
|
|
234
|
+
* Creates a test plan.
|
|
235
|
+
*
|
|
236
|
+
* @template Target - The type upon which an action is performed.
|
|
237
|
+
*/
|
|
238
|
+
<Target>(): Actions;
|
|
239
|
+
/**
|
|
240
|
+
* Creates a test plan.
|
|
241
|
+
*
|
|
242
|
+
* @param target - The expression upon which an action is performed.
|
|
243
|
+
*/
|
|
244
|
+
(target: unknown): Actions;
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* Creates a test plan.
|
|
248
|
+
*/
|
|
249
|
+
declare const when: When;
|
|
250
|
+
|
|
251
|
+
export { describe, expect, it, omit, pick, test, when };
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
interface Describe {
|
|
2
|
+
/**
|
|
3
|
+
* Defines a group of tests.
|
|
4
|
+
*
|
|
5
|
+
* @param name - The name of the group.
|
|
6
|
+
* @param callback - The function to create a scope for a group of tests.
|
|
7
|
+
*/
|
|
8
|
+
(name: string, callback: () => void | Promise<void>): void;
|
|
9
|
+
/**
|
|
10
|
+
* Marks a group of tests as focused.
|
|
11
|
+
*
|
|
12
|
+
* @param name - The name of the group.
|
|
13
|
+
* @param callback - The function to create a scope for a group of tests.
|
|
14
|
+
*/
|
|
15
|
+
only: (name: string, callback: () => void | Promise<void>) => void;
|
|
16
|
+
/**
|
|
17
|
+
* Marks a group of tests as skipped.
|
|
18
|
+
*
|
|
19
|
+
* @param name - The name of the group.
|
|
20
|
+
* @param callback - The function to create a scope for a group of tests.
|
|
21
|
+
*/
|
|
22
|
+
skip: (name: string, callback: () => void | Promise<void>) => void;
|
|
23
|
+
/**
|
|
24
|
+
* Marks a group of tests as yet to be implemented.
|
|
25
|
+
*
|
|
26
|
+
* @param name - The name of the group.
|
|
27
|
+
* @param callback - The function to create a scope for a group of tests.
|
|
28
|
+
*/
|
|
29
|
+
todo: (name: string, callback?: () => void | Promise<void>) => void;
|
|
30
|
+
}
|
|
31
|
+
interface Test {
|
|
32
|
+
/**
|
|
33
|
+
* Defines a single test.
|
|
34
|
+
*
|
|
35
|
+
* @param name - The name of the test.
|
|
36
|
+
* @param callback - The function with a code snippet and assertions.
|
|
37
|
+
*/
|
|
38
|
+
(name: string, callback: () => void | Promise<void>): void;
|
|
39
|
+
/**
|
|
40
|
+
* Marks a test as focused.
|
|
41
|
+
*
|
|
42
|
+
* @param name - The name of the test.
|
|
43
|
+
* @param callback - The function with a code snippet and assertions.
|
|
44
|
+
*/
|
|
45
|
+
only: (name: string, callback: () => void | Promise<void>) => void;
|
|
46
|
+
/**
|
|
47
|
+
* Marks a test as skipped.
|
|
48
|
+
*
|
|
49
|
+
* @param name - The name of the test.
|
|
50
|
+
* @param callback - The function with a code snippet and assertions.
|
|
51
|
+
*/
|
|
52
|
+
skip: (name: string, callback: () => void | Promise<void>) => void;
|
|
53
|
+
/**
|
|
54
|
+
* Marks a test as yet to be implemented.
|
|
55
|
+
*
|
|
56
|
+
* @param name - The name of the test.
|
|
57
|
+
* @param callback - The function with a code snippet and assertions.
|
|
58
|
+
*/
|
|
59
|
+
todo: (name: string, callback?: () => void | Promise<void>) => void;
|
|
60
|
+
}
|
|
61
|
+
interface Matchers {
|
|
62
|
+
/**
|
|
63
|
+
* Checks if the JSX component accepts props of the given type.
|
|
64
|
+
*
|
|
65
|
+
* @remarks
|
|
66
|
+
*
|
|
67
|
+
* This is a work in progress feature. Generic components are not yet supported.
|
|
68
|
+
*/
|
|
69
|
+
toAcceptProps: {
|
|
70
|
+
/**
|
|
71
|
+
* Checks if the JSX component accepts props of the given type.
|
|
72
|
+
*
|
|
73
|
+
* @remarks
|
|
74
|
+
*
|
|
75
|
+
* This is a work in progress feature. Generic components are not yet supported.
|
|
76
|
+
*/
|
|
77
|
+
<Target>(): void;
|
|
78
|
+
/**
|
|
79
|
+
* Checks if the JSX component accepts the given props.
|
|
80
|
+
*
|
|
81
|
+
* @remarks
|
|
82
|
+
*
|
|
83
|
+
* This is a work in progress feature. Generic components are not yet supported.
|
|
84
|
+
*/
|
|
85
|
+
(target: unknown): void;
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* Checks if the source type is the same as the target type.
|
|
89
|
+
*/
|
|
90
|
+
toBe: {
|
|
91
|
+
/**
|
|
92
|
+
* Checks if the source type is the same as the target type.
|
|
93
|
+
*/
|
|
94
|
+
<Target>(): void;
|
|
95
|
+
/**
|
|
96
|
+
* Checks if the source type is the same as type of the target expression.
|
|
97
|
+
*/
|
|
98
|
+
(target: unknown): void;
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* Checks if the source type is assignable from the target type.
|
|
102
|
+
*/
|
|
103
|
+
toBeAssignableFrom: {
|
|
104
|
+
/**
|
|
105
|
+
* Checks if the source type is assignable from the target type.
|
|
106
|
+
*/
|
|
107
|
+
<Target>(): void;
|
|
108
|
+
/**
|
|
109
|
+
* Checks if the source type is assignable from type of the target expression.
|
|
110
|
+
*/
|
|
111
|
+
(target: unknown): void;
|
|
112
|
+
};
|
|
113
|
+
/**
|
|
114
|
+
* Checks if the source type is assignable to the target type.
|
|
115
|
+
*/
|
|
116
|
+
toBeAssignableTo: {
|
|
117
|
+
/**
|
|
118
|
+
* Checks if the source type is assignable to the target type.
|
|
119
|
+
*/
|
|
120
|
+
<Target>(): void;
|
|
121
|
+
/**
|
|
122
|
+
* Checks if the source type is assignable to type of the target expression.
|
|
123
|
+
*/
|
|
124
|
+
(target: unknown): void;
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* Checks if the source type is callable with the given arguments.
|
|
128
|
+
*/
|
|
129
|
+
toBeCallableWith: (...args: Array<unknown>) => void;
|
|
130
|
+
/**
|
|
131
|
+
* Checks if the source type is constructable with the given arguments.
|
|
132
|
+
*/
|
|
133
|
+
toBeConstructableWith: (...args: Array<unknown>) => void;
|
|
134
|
+
/**
|
|
135
|
+
* Checks if a property key exists on the source type.
|
|
136
|
+
*/
|
|
137
|
+
toHaveProperty: (key: string | number | symbol) => void;
|
|
138
|
+
/**
|
|
139
|
+
* Checks if the source type raises an error.
|
|
140
|
+
*/
|
|
141
|
+
toRaiseError: (...target: Array<string | number | RegExp>) => void;
|
|
142
|
+
}
|
|
143
|
+
interface Modifier {
|
|
144
|
+
/**
|
|
145
|
+
* Passes the source type to the matcher.
|
|
146
|
+
*/
|
|
147
|
+
type: Matchers & {
|
|
148
|
+
/**
|
|
149
|
+
* Negates the assertion.
|
|
150
|
+
*/
|
|
151
|
+
not: Matchers;
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
interface Expect {
|
|
155
|
+
/**
|
|
156
|
+
* Builds an assertion.
|
|
157
|
+
*
|
|
158
|
+
* @template Source - The type which is checked.
|
|
159
|
+
*/
|
|
160
|
+
<Source>(): Modifier;
|
|
161
|
+
/**
|
|
162
|
+
* Builds an assertion.
|
|
163
|
+
*
|
|
164
|
+
* @param source - The expression whose type is checked.
|
|
165
|
+
*/
|
|
166
|
+
(source: unknown): Modifier;
|
|
167
|
+
/**
|
|
168
|
+
* Marks an assertion as focused.
|
|
169
|
+
*/
|
|
170
|
+
only: {
|
|
171
|
+
/**
|
|
172
|
+
* Marks an assertion as focused.
|
|
173
|
+
*
|
|
174
|
+
* @template Source - The type which is checked.
|
|
175
|
+
*/
|
|
176
|
+
<Source>(): Modifier;
|
|
177
|
+
/**
|
|
178
|
+
* Marks an assertion as focused.
|
|
179
|
+
*
|
|
180
|
+
* @param source - The expression whose type is checked.
|
|
181
|
+
*/
|
|
182
|
+
(source: unknown): Modifier;
|
|
183
|
+
};
|
|
184
|
+
/**
|
|
185
|
+
* Marks an assertion as skipped.
|
|
186
|
+
*/
|
|
187
|
+
skip: {
|
|
188
|
+
/**
|
|
189
|
+
* Marks an assertion as skipped.
|
|
190
|
+
*
|
|
191
|
+
* @template Source - The type which is checked.
|
|
192
|
+
*/
|
|
193
|
+
<Source>(): Modifier;
|
|
194
|
+
/**
|
|
195
|
+
* Marks an assertion as skipped.
|
|
196
|
+
*
|
|
197
|
+
* @param source - The expression whose type is checked.
|
|
198
|
+
*/
|
|
199
|
+
(source: unknown): Modifier;
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Builds an assertion.
|
|
204
|
+
*/
|
|
205
|
+
declare const expect: Expect;
|
|
206
|
+
/**
|
|
207
|
+
* Reshapes type of the given object by removing the specified keys.
|
|
208
|
+
*/
|
|
209
|
+
declare function omit<T, K extends PropertyKey>(object: T, ...keys: [K, ...Array<K>]): Omit<T, K>;
|
|
210
|
+
/**
|
|
211
|
+
* Reshapes type of the given object by keeping only the specified keys.
|
|
212
|
+
*/
|
|
213
|
+
declare function pick<T, K extends keyof T>(object: T, ...keys: [K, ...Array<K>]): Pick<T, K>;
|
|
214
|
+
/**
|
|
215
|
+
* Defines a test group.
|
|
216
|
+
*/
|
|
217
|
+
declare const describe: Describe;
|
|
218
|
+
/**
|
|
219
|
+
* Defines a single test.
|
|
220
|
+
*/
|
|
221
|
+
declare const test: Test;
|
|
222
|
+
/**
|
|
223
|
+
* Defines a single test.
|
|
224
|
+
*/
|
|
225
|
+
declare const it: Test;
|
|
226
|
+
interface Actions {
|
|
227
|
+
/**
|
|
228
|
+
* Calls the given function with the provided arguments.
|
|
229
|
+
*/
|
|
230
|
+
isCalledWith: (...args: Array<unknown>) => void;
|
|
231
|
+
}
|
|
232
|
+
interface When {
|
|
233
|
+
/**
|
|
234
|
+
* Creates a test plan.
|
|
235
|
+
*
|
|
236
|
+
* @template Target - The type upon which an action is performed.
|
|
237
|
+
*/
|
|
238
|
+
<Target>(): Actions;
|
|
239
|
+
/**
|
|
240
|
+
* Creates a test plan.
|
|
241
|
+
*
|
|
242
|
+
* @param target - The expression upon which an action is performed.
|
|
243
|
+
*/
|
|
244
|
+
(target: unknown): Actions;
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* Creates a test plan.
|
|
248
|
+
*/
|
|
249
|
+
declare const when: When;
|
|
250
|
+
|
|
251
|
+
export { describe, expect, it, omit, pick, test, when };
|
package/build/index.d.cts
CHANGED
|
@@ -102,39 +102,39 @@ interface Matchers {
|
|
|
102
102
|
*/
|
|
103
103
|
toBeApplicable: (target: unknown, context: DecoratorContext) => void;
|
|
104
104
|
/**
|
|
105
|
-
* Checks if the source type is assignable
|
|
105
|
+
* Checks if the source type is assignable from the target type.
|
|
106
106
|
*/
|
|
107
|
-
|
|
107
|
+
toBeAssignableFrom: {
|
|
108
108
|
/**
|
|
109
|
-
* Checks if the source type is assignable
|
|
109
|
+
* Checks if the source type is assignable from the target type.
|
|
110
110
|
*/
|
|
111
111
|
<Target>(): void;
|
|
112
112
|
/**
|
|
113
|
-
* Checks if the source type is assignable
|
|
113
|
+
* Checks if the source type is assignable from type of the target expression.
|
|
114
114
|
*/
|
|
115
115
|
(target: unknown): void;
|
|
116
116
|
};
|
|
117
117
|
/**
|
|
118
|
-
* Checks if the source type is assignable
|
|
118
|
+
* Checks if the source type is assignable to the target type.
|
|
119
119
|
*/
|
|
120
|
-
|
|
120
|
+
toBeAssignableTo: {
|
|
121
121
|
/**
|
|
122
|
-
* Checks if the source type is assignable
|
|
122
|
+
* Checks if the source type is assignable to the target type.
|
|
123
123
|
*/
|
|
124
124
|
<Target>(): void;
|
|
125
125
|
/**
|
|
126
|
-
* Checks if the source type is assignable
|
|
126
|
+
* Checks if the source type is assignable to type of the target expression.
|
|
127
127
|
*/
|
|
128
128
|
(target: unknown): void;
|
|
129
129
|
};
|
|
130
130
|
/**
|
|
131
131
|
* Checks if the source type is callable with the given arguments.
|
|
132
132
|
*/
|
|
133
|
-
toBeCallableWith: (...
|
|
133
|
+
toBeCallableWith: (...args: Array<unknown>) => void;
|
|
134
134
|
/**
|
|
135
135
|
* Checks if the source type is constructable with the given arguments.
|
|
136
136
|
*/
|
|
137
|
-
toBeConstructableWith: (...
|
|
137
|
+
toBeConstructableWith: (...args: Array<unknown>) => void;
|
|
138
138
|
/**
|
|
139
139
|
* Checks if a property key exists on the source type.
|
|
140
140
|
*/
|
|
@@ -159,13 +159,13 @@ interface Expect {
|
|
|
159
159
|
/**
|
|
160
160
|
* Builds an assertion.
|
|
161
161
|
*
|
|
162
|
-
* @template Source - The type
|
|
162
|
+
* @template Source - The type which is checked.
|
|
163
163
|
*/
|
|
164
164
|
<Source>(): Modifier;
|
|
165
165
|
/**
|
|
166
166
|
* Builds an assertion.
|
|
167
167
|
*
|
|
168
|
-
* @param source - The expression
|
|
168
|
+
* @param source - The expression whose type is checked.
|
|
169
169
|
*/
|
|
170
170
|
(source: unknown): Modifier;
|
|
171
171
|
/**
|
|
@@ -175,13 +175,13 @@ interface Expect {
|
|
|
175
175
|
/**
|
|
176
176
|
* Marks an assertion as focused.
|
|
177
177
|
*
|
|
178
|
-
* @template Source - The type
|
|
178
|
+
* @template Source - The type which is checked.
|
|
179
179
|
*/
|
|
180
180
|
<Source>(): Modifier;
|
|
181
181
|
/**
|
|
182
182
|
* Marks an assertion as focused.
|
|
183
183
|
*
|
|
184
|
-
* @param source - The expression
|
|
184
|
+
* @param source - The expression whose type is checked.
|
|
185
185
|
*/
|
|
186
186
|
(source: unknown): Modifier;
|
|
187
187
|
};
|
|
@@ -192,13 +192,13 @@ interface Expect {
|
|
|
192
192
|
/**
|
|
193
193
|
* Marks an assertion as skipped.
|
|
194
194
|
*
|
|
195
|
-
* @template Source - The type
|
|
195
|
+
* @template Source - The type which is checked.
|
|
196
196
|
*/
|
|
197
197
|
<Source>(): Modifier;
|
|
198
198
|
/**
|
|
199
199
|
* Marks an assertion as skipped.
|
|
200
200
|
*
|
|
201
|
-
* @param source - The expression
|
|
201
|
+
* @param source - The expression whose type is checked.
|
|
202
202
|
*/
|
|
203
203
|
(source: unknown): Modifier;
|
|
204
204
|
};
|
package/build/index.d.ts
CHANGED
|
@@ -102,39 +102,39 @@ interface Matchers {
|
|
|
102
102
|
*/
|
|
103
103
|
toBeApplicable: (target: unknown, context: DecoratorContext) => void;
|
|
104
104
|
/**
|
|
105
|
-
* Checks if the source type is assignable
|
|
105
|
+
* Checks if the source type is assignable from the target type.
|
|
106
106
|
*/
|
|
107
|
-
|
|
107
|
+
toBeAssignableFrom: {
|
|
108
108
|
/**
|
|
109
|
-
* Checks if the source type is assignable
|
|
109
|
+
* Checks if the source type is assignable from the target type.
|
|
110
110
|
*/
|
|
111
111
|
<Target>(): void;
|
|
112
112
|
/**
|
|
113
|
-
* Checks if the source type is assignable
|
|
113
|
+
* Checks if the source type is assignable from type of the target expression.
|
|
114
114
|
*/
|
|
115
115
|
(target: unknown): void;
|
|
116
116
|
};
|
|
117
117
|
/**
|
|
118
|
-
* Checks if the source type is assignable
|
|
118
|
+
* Checks if the source type is assignable to the target type.
|
|
119
119
|
*/
|
|
120
|
-
|
|
120
|
+
toBeAssignableTo: {
|
|
121
121
|
/**
|
|
122
|
-
* Checks if the source type is assignable
|
|
122
|
+
* Checks if the source type is assignable to the target type.
|
|
123
123
|
*/
|
|
124
124
|
<Target>(): void;
|
|
125
125
|
/**
|
|
126
|
-
* Checks if the source type is assignable
|
|
126
|
+
* Checks if the source type is assignable to type of the target expression.
|
|
127
127
|
*/
|
|
128
128
|
(target: unknown): void;
|
|
129
129
|
};
|
|
130
130
|
/**
|
|
131
131
|
* Checks if the source type is callable with the given arguments.
|
|
132
132
|
*/
|
|
133
|
-
toBeCallableWith: (...
|
|
133
|
+
toBeCallableWith: (...args: Array<unknown>) => void;
|
|
134
134
|
/**
|
|
135
135
|
* Checks if the source type is constructable with the given arguments.
|
|
136
136
|
*/
|
|
137
|
-
toBeConstructableWith: (...
|
|
137
|
+
toBeConstructableWith: (...args: Array<unknown>) => void;
|
|
138
138
|
/**
|
|
139
139
|
* Checks if a property key exists on the source type.
|
|
140
140
|
*/
|
|
@@ -159,13 +159,13 @@ interface Expect {
|
|
|
159
159
|
/**
|
|
160
160
|
* Builds an assertion.
|
|
161
161
|
*
|
|
162
|
-
* @template Source - The type
|
|
162
|
+
* @template Source - The type which is checked.
|
|
163
163
|
*/
|
|
164
164
|
<Source>(): Modifier;
|
|
165
165
|
/**
|
|
166
166
|
* Builds an assertion.
|
|
167
167
|
*
|
|
168
|
-
* @param source - The expression
|
|
168
|
+
* @param source - The expression whose type is checked.
|
|
169
169
|
*/
|
|
170
170
|
(source: unknown): Modifier;
|
|
171
171
|
/**
|
|
@@ -175,13 +175,13 @@ interface Expect {
|
|
|
175
175
|
/**
|
|
176
176
|
* Marks an assertion as focused.
|
|
177
177
|
*
|
|
178
|
-
* @template Source - The type
|
|
178
|
+
* @template Source - The type which is checked.
|
|
179
179
|
*/
|
|
180
180
|
<Source>(): Modifier;
|
|
181
181
|
/**
|
|
182
182
|
* Marks an assertion as focused.
|
|
183
183
|
*
|
|
184
|
-
* @param source - The expression
|
|
184
|
+
* @param source - The expression whose type is checked.
|
|
185
185
|
*/
|
|
186
186
|
(source: unknown): Modifier;
|
|
187
187
|
};
|
|
@@ -192,13 +192,13 @@ interface Expect {
|
|
|
192
192
|
/**
|
|
193
193
|
* Marks an assertion as skipped.
|
|
194
194
|
*
|
|
195
|
-
* @template Source - The type
|
|
195
|
+
* @template Source - The type which is checked.
|
|
196
196
|
*/
|
|
197
197
|
<Source>(): Modifier;
|
|
198
198
|
/**
|
|
199
199
|
* Marks an assertion as skipped.
|
|
200
200
|
*
|
|
201
|
-
* @param source - The expression
|
|
201
|
+
* @param source - The expression whose type is checked.
|
|
202
202
|
*/
|
|
203
203
|
(source: unknown): Modifier;
|
|
204
204
|
};
|