Skip to content

Commit

Permalink
tsconfig is now strict
Browse files Browse the repository at this point in the history
  • Loading branch information
UrielCh committed Apr 30, 2024
1 parent 03d8315 commit 2c31eb0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/lib/cvloader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export function getOpenCV(opt?: OpenCVBuildEnvParams): OpenCVType {

} catch (err) {
// err.code === 'ERR_DLOPEN_FAILED'
logDebug('require', `failed to require cv with exception: ${pc.red(err.toString())}`)
logDebug('require', `failed to require cv with exception: ${pc.red((err as Error).toString())}`)
logDebug('require', 'attempting to add opencv binaries to path')

if (!process.env.path) {
Expand Down
4 changes: 2 additions & 2 deletions src/lib/opencv4nodejs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ function loadOpenCV(opt?: OpenCVBuildEnvParams): OpenCVType {
const dirname = getDirName();
const xmlDir = path.join(dirname, '..', '..', 'src', 'lib');
Object.keys(haarCascades).forEach(
key => cvBase[key] = resolvePath(path.join(xmlDir, 'haarcascades'), haarCascades[key]));
key => (cvBase as any)[key] = resolvePath(path.join(xmlDir, 'haarcascades'), haarCascades[key as keyof typeof haarCascades]));
Object.keys(lbpCascades).forEach(
key => cvBase[key] = resolvePath(path.join(xmlDir, 'lbpcascades'), lbpCascades[key]));
key => (cvBase as any)[key] = resolvePath(path.join(xmlDir, 'lbpcascades'), lbpCascades[key as keyof typeof lbpCascades]));
// promisify async methods
let cvObj = promisify<OpenCVType>(cvBase);
cvObj = extendWithJsSources(cvObj);
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"compilerOptions": {
"module": "commonjs",
"declaration": false,
"strict": false,
"strict": true,
// "declarationMap": false,
// "declarationDir": "types",
"outDir": "cjs",
Expand Down

0 comments on commit 2c31eb0

Please sign in to comment.