mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-24 00:23:12 +09:00
Fix bad typings detected by linting
Fix badly typed expressions that were detected by turning on `@typescript-eslint/no-unnecessary-condition` in eslint.
This commit is contained in:
1 parent
90a88f7e01
commit
ec734c92bc
29 files changed
+62
-73
No files matched your search
@@ -21,7 +21,7 @@ export function compile<T>(schema: JSONSchemaType<T>) {
|
||||
return ajv.compile<T>(schema);
|
||||
}
|
||||
|
||||
let doValidate: ValidateFunction<T>;
|
||||
let doValidate: ValidateFunction<T> | undefined;
|
||||
const validate = <ValidateFunction<T>> function (data) {
|
||||
if (!doValidate) {
|
||||
doValidate = ajv.compile(schema);
|
||||
|
||||
Reference in new issue
Block a user