Skip to content

Commit 605e34f

Browse files
author
Sascha Goldhofer
committed
chore: remove ts-ignore
1 parent d755083 commit 605e34f

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

dist/jsonSchemaLibrary.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/module/lib/schema/getTypeId.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ export default function getTypeId(schema) {
1616
if (schema.enum) {
1717
return "enum";
1818
}
19-
// @ts-ignore
20-
if (types[schema.type] || Array.isArray(schema.type)) {
21-
return schema.type;
19+
const type = schema.type;
20+
if (Array.isArray(type) || types[type]) {
21+
return type;
2222
}
2323
const ids = typeKeywords.filter((type) => schema[type]);
2424
if (ids.length === 1) {

lib/schema/getTypeId.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ export default function getTypeId(schema: JsonSchema): string | string[] | undef
2121
return "enum";
2222
}
2323

24-
// @ts-ignore
25-
if (types[schema.type] || Array.isArray(schema.type)) {
26-
return schema.type;
24+
const type = schema.type as string | string[];
25+
if (Array.isArray(type) || types[type]) {
26+
return type;
2727
}
2828

2929
const ids = typeKeywords.filter((type) => schema[type]);

0 commit comments

Comments
 (0)