TS1202

error TS1202: Import assignment cannot be used when targeting ECMAScript modules. Consider using ‘import * as ns from “mod”‘, ‘import {a} from “mod”‘, ‘import d from “mod”‘, or another module format instead.

Bad Code ❌

1
import sinon = require('sinon');

Fixed Code ✔️

1
import * as sinon from 'sinon';