runtime-node
runtime-node copied to clipboard
Use @ts-ignore instead of @ts-expect-error
/** TS_EXPECT_TYPES_ERROR_OPTIONAL_DEPENDENCY **/
import type { Express, Router } from "express";
We replace TS_EXPECT_TYPES_ERROR_OPTIONAL_DEPENDENCY with @ts-expect-error in our build script. We expect an error if e.g. express is installed (since we expose middleware for a few frameworks).
If the user has "skipLibCheck": true in their tsconfig.json, TypeScript won't type check our library declaration files.
When the user has express installed and skipLibCheck is false, there is no error but since TypeScript expects an error...
That's why I replaced @ts-expect-error with @ts-ignore
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
:loudspeaker: Thoughts on this report? Let us know!