From fd25d51740501fe1a5c33dfdeda69f7be40b8364 Mon Sep 17 00:00:00 2001 From: Mykola Mokhnach Date: Fri, 8 May 2026 07:43:55 +0200 Subject: [PATCH] chore: Enable strict TS mode --- lib/devicectl.ts | 4 +++- lib/types.ts | 2 +- tsconfig.json | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/devicectl.ts b/lib/devicectl.ts index dd41593..7617f68 100644 --- a/lib/devicectl.ts +++ b/lib/devicectl.ts @@ -103,7 +103,9 @@ export class Devicectl { return result as ExecuteResult; } catch (e: any) { - throw new Error(`'${cmdStr}' failed. Original error: ${e.stderr || e.stdout || e.message}`); + throw new Error(`'${cmdStr}' failed. Original error: ${e.stderr || e.stdout || e.message}`, { + cause: e, + }); } } diff --git a/lib/types.ts b/lib/types.ts index 9fd7178..b5c52ba 100644 --- a/lib/types.ts +++ b/lib/types.ts @@ -1,4 +1,4 @@ -import {SubProcess, TeenProcessExecResult} from 'teen_process'; +import type {SubProcess, TeenProcessExecResult} from 'teen_process'; /** * Information about a running process on the device diff --git a/tsconfig.json b/tsconfig.json index bea76f8..7f46171 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,7 +5,8 @@ "outDir": "build", "checkJs": true, "esModuleInterop": true, - "types": ["node", "mocha"] + "types": ["node", "mocha"], + "strict": true }, "ts-node": { "transpileOnly": true,