File tree 2 files changed +28
-6
lines changed
2 files changed +28
-6
lines changed Original file line number Diff line number Diff line change
1
+ interface Result {
2
+ name : 'AssertionError' | 'AssertionResult'
3
+ ok : boolean
4
+ toJSON ( ...args : unknown [ ] ) : Record < string , unknown >
5
+ }
6
+
7
+ declare class AssertionError < T > extends Error implements Result {
8
+ [ key : string ] : unknown ;
9
+ name : 'AssertionError' ;
10
+ ok : false ;
11
+ message : string ;
12
+ constructor ( message : string , props ?: T , ssf ?: Function ) ;
13
+ stack : string ;
14
+ toJSON ( stack ?: boolean ) : Record < string , unknown > ;
15
+ }
16
+
17
+ declare class AssertionResult < T > implements Result {
18
+ [ key : string ] : unknown ;
19
+ name : 'AssertionResult' ;
20
+ ok : true ;
21
+ message : string ;
22
+ constructor ( props ?: T ) ;
23
+ toJSON ( ) : Record < string , unknown > ;
24
+ }
25
+
26
+ export { Result , AssertionError , AssertionResult }
Original file line number Diff line number Diff line change
1
+ import { Result } from './index.d.ts'
2
+
1
3
const canElideFrames = "captureStackTrace" in Error ;
2
4
const startStackFrames = new WeakMap ( ) ;
3
5
4
- interface Result {
5
- name : "AssertionError" | "AssertionResult" ;
6
- ok : boolean ;
7
- toJSON ( ...args : unknown [ ] ) : Record < string , unknown > ;
8
- }
9
-
10
6
export class AssertionError < T > extends Error implements Result {
11
7
[ key : string ] : unknown
12
8
You can’t perform that action at this time.
0 commit comments