1- import * as ts from "./_namespaces/ts " ;
1+ import * as chai from "chai " ;
22
3- // Block scoped definitions work poorly for global variables, temporarily enable var
4- /* eslint-disable no-var */
3+ import * as ts from "./_namespaces/ts" ;
54
65// this will work in the browser via browserify
76declare global {
87 // Module transform: converted from ambient declaration
9- var assert : typeof _chai . assert ;
8+ var assert : typeof chai . assert ; // eslint-disable-line no-var
109}
1110declare global {
1211 // Module transform: converted from ambient declaration
13- var expect : typeof _chai . expect ;
12+ var expect : typeof chai . expect ; // eslint-disable-line no-var
1413}
15- var _chai : typeof import ( "chai" ) = require ( "chai" ) ;
16- globalThis . assert = _chai . assert ;
14+ globalThis . assert = chai . assert ;
1715{
1816 // chai's builtin `assert.isFalse` is featureful but slow - we don't use those features,
1917 // so we'll just overwrite it as an alterative to migrating a bunch of code off of chai
@@ -39,7 +37,7 @@ globalThis.assert = _chai.assert;
3937 }
4038 } ;
4139}
42- globalThis . expect = _chai . expect ;
43- /* eslint-enable no-var */
40+ globalThis . expect = chai . expect ;
41+
4442// empty ts namespace so this file is included in the `ts.ts` namespace file generated by the module swapover
45- // This way, everything that ends up importing `ts` downstream also imports this file and picks up its augmentation
43+ // This way, everything that ends up importing `ts` downstream also imports this file and picks up its augmentation
0 commit comments