I wrote a simple function as follows:
export const courseIndustry: any = {
getById: (id: string) => {
return {};
}
};
And I thought I specified that the argument id is of type string, but the mocha test
claims:
mocha -r ts-node/register -r espower-typescript/guess test/**/*.test.ts
Unable to compile TypeScript: courseIndustry.ts(4, 15): error TS7006: Parameter 'id' implicitly has an 'any' type.
Where am I wrong?