Skip to content

Commit

Permalink
Major updates of typia and ts-runtime-checks. (#1131)
Browse files Browse the repository at this point in the history
There had been major updates of both two libraries. Also, added a special dependency `@types/ts-expose-internals` for a while to avoid domestic bug of `ts-runtime-checks`.

  - GoogleFeud/ts-runtime-checks#35
  • Loading branch information
samchon authored Sep 1, 2023
1 parent 70d1e41 commit d8f4778
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 31 deletions.
3 changes: 2 additions & 1 deletion cases/typia/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ interface ToBeChecked {

const is = typia.createIs<ToBeChecked>();
const equals = typia.createEquals<ToBeChecked>();
const clone = typia.misc.createClone<ToBeChecked>();

export function assertLoose(input: unknown): boolean {
if (!is(input)) throw new Error('wrong type.');
Expand All @@ -34,5 +35,5 @@ export function parseStrict(input: unknown): ToBeChecked {

export function parseSafe(input: unknown): ToBeChecked {
if (!is(input)) throw new Error('wrong type.');
return typia.clone(input);
return clone(input);
}
90 changes: 62 additions & 28 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@
"ts-interface-checker": "1.0.2",
"ts-json-validator": "0.7.1",
"ts-node": "10.9.1",
"ts-runtime-checks": "0.2.0",
"ts-runtime-checks": "0.4.0",
"typescript": "5.1.6",
"typia": "4.1.16",
"typia": "5.0.1",
"valibot": "0.13.1",
"vality": "6.3.3",
"vega": "5.25.0",
Expand All @@ -88,6 +88,7 @@
"@types/jest": "29.5.3",
"@types/node": "^18.11.18",
"@types/svgo": "2.6.0",
"@types/ts-expose-internals": "npm:ts-expose-internals@5.1.6",
"@types/yup": "0.29.14",
"babel-plugin-spectypes": "2.1.9",
"expect-type": "0.16.0",
Expand Down

0 comments on commit d8f4778

Please sign in to comment.