We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a564366 commit 46b2aa8Copy full SHA for 46b2aa8
lib/draft06/compile/index.ts
@@ -37,7 +37,7 @@ export default function compileSchema(
37
rootSchema = schemaToCompile,
38
force = false
39
): JsonSchema {
40
- // @ts-ignore
+ // @ts-expect-error incomplete JsonSchema type
41
if (schemaToCompile === true || schemaToCompile === false || schemaToCompile === undefined) {
42
return schemaToCompile;
43
}
lib/utils/isEmpty.ts
@@ -5,8 +5,8 @@ export function isEmpty(v: unknown): boolean {
5
switch (type) {
6
case "string":
7
case "array":
8
9
- return v.length === 0;
+ // @ts-expect-error tested as array - could use ts type guard
+ return v?.length === 0;
10
case "null":
11
case "undefined":
12
return true;
0 commit comments