Skip to content

Commit 1f3a0e3

Browse files
committed
chore(webdriver): enable some of tsconfig's strict rules
1 parent a2313df commit 1f3a0e3

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

webdriver-ts/src/benchmarkRunner.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ async function runBench(
259259
warnings = warnings.concat(result.warnings);
260260
} catch (e) {
261261
console.log("UNHANDELED ERROR", e);
262-
errors.push(e);
262+
errors.push(e as string);
263263
}
264264
}
265265
}

webdriver-ts/src/common.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ async function fetchFrameworks(url: string) {
125125
return await response.json();
126126
} catch (error) {
127127
console.log(error);
128-
throw new Error(error);
128+
throw new Error(error as string);
129129
}
130130
}
131131

@@ -139,7 +139,7 @@ export async function initializeFrameworks(
139139
try {
140140
lsResult = await fetchFrameworks(lsUrl);
141141
} catch (error) {
142-
throw new Error(error);
142+
throw new Error(error as string);
143143
}
144144

145145
let frameworks: FrameworkData[] = [];

webdriver-ts/tsconfig.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,19 @@
33
"outDir": "dist",
44
"rootDir": "src",
55
"sourceMap": true,
6-
"noImplicitAny": true,
76
"module": "NodeNext",
87
"moduleResolution": "NodeNext",
98
"declaration": false,
109
"target": "es2017",
1110
"allowSyntheticDefaultImports": true,
1211
"noLib": false,
13-
"typeRoots": ["./node_modules/@types", "./src/typings"]
12+
"typeRoots": ["./node_modules/@types", "./src/typings"],
13+
14+
"noImplicitAny": true,
15+
"alwaysStrict": true,
16+
"strictBindCallApply": true,
17+
"strictFunctionTypes": true,
18+
"useUnknownInCatchVariables": true
1419
},
1520
"include": ["src/**/*.ts"],
1621
"exclude": ["**/*.test.ts"]

0 commit comments

Comments
 (0)