Skip to content

Commit 43aa7e4

Browse files
committed
fix(cli): update typescript to the latest supported by tsj
1 parent 348989f commit 43aa7e4

File tree

5 files changed

+974
-891
lines changed

5 files changed

+974
-891
lines changed

.changeset/eight-glasses-protect.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@ddadaal/next-typed-api-routes-cli": patch
3+
---
4+
5+
update typescript to the latest supported by tsj

example/api-routes-schemas.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,10 @@
162162
"additionalProperties": false,
163163
"$id": "LoginInfo",
164164
"title": "LoginInfo"
165+
},
166+
"def-any": {
167+
"$id": "def-any",
168+
"title": "def-any"
165169
}
166170
}
167171
}

packages/cli/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@
3030
"url": "https://github.com/ddadaal/next-typed-api-routes/issues"
3131
},
3232
"dependencies": {
33-
"ts-json-schema-generator": "1.0.0",
33+
"ts-json-schema-generator": "1.2.0",
3434
"tslib": "^2.3.1",
35-
"typescript": "4.6.4",
35+
"typescript": "4.9.5",
3636
"yargs": "^17.2.1"
3737
},
3838
"devDependencies": {

packages/cli/src/generateSchemas.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ export class IgnoreArrowFunctionParser implements SubNodeParser {
3434
supportsNode(node: ts.Node): boolean {
3535
return ts.isArrowFunction(node);
3636
}
37-
createType(): BaseType | undefined {
38-
return undefined;
37+
createType(): BaseType {
38+
return new tsj.AnyType();
3939
}
4040
}
4141

0 commit comments

Comments
 (0)