I have the JavaScript code below, and I'm using the TypeScript Compiler (TSC) to provide type-checking as per the Typescript Docs JSDoc Reference.
const assert = require('assert');
const mocha = require('mocha');
mocha.describe('Array', () => {
mocha.describe('#indexOf()', () => {
mocha.it('should return -1 when the value is not present',
/** */
() => {
assert.strictEqual([1, 2, 3].indexOf(4), -1);
});
});
});
I'm seeing this error:
Assertions require every name in the call target to be declared with an explicit type annotation.ts(2775)
SomeFile.test.js(2, 7): 'assert' needs an explicit type annotation.