Typescript Json Versions Save

Super-fast/easy runtime validations and serializations through transformation

v6.0.3

4 weeks ago

What's Changed

Full Changelog: https://github.com/samchon/typia/compare/v6.0.2...v6.0.3

v6.0.2

1 month ago

What's Changed

Full Changelog: https://github.com/samchon/typia/compare/v6.0.1...v6.0.2

v6.0.1

1 month ago

typia.json.application() function has been changed to support standard OpenAPI v3.0/v3.1 specified JSON schema.

About the detailed OpenAPI spec's JSON schema structures, visit one of below:

You can use it like below:

typia.json.application<[X, Y, Z], "3.0">();
typia.json.application<[X, Y, Z], "3.1">();

What's Changed

Full Changelog: https://github.com/samchon/typia/compare/v5.5.10...v6.0.1

v5.5.10

1 month ago

What's Changed

Full Changelog: https://github.com/samchon/typia/compare/v5.5.8...v5.5.10

v5.5.8

1 month ago

What's Changed

Full Changelog: https://github.com/samchon/typia/compare/v5.5.7...v5.5.8

v5.5.7

1 month ago

What's Changed

Full Changelog: https://github.com/samchon/typia/compare/v5.5.5...v5.5.7

v5.5.5

2 months ago

What's Changed

Full Changelog: https://github.com/samchon/typia/compare/v5.5.4...v5.5.5

v5.5.4

2 months ago

What's Changed

Full Changelog: https://github.com/samchon/typia/compare/v5.5.3...v5.5.4

v5.5.3

2 months ago

What's Changed

Full Changelog: https://github.com/samchon/typia/compare/v5.5.2...v5.5.3

v5.5.2

2 months ago

New module functional for entire function level validation.

export namespace functional {
  export function assertFunction<T extends Function>(func: T): T;

  export function isFunction<T extends (...args: any[]) => any>(
    func: T,
  ): T extends (...args: infer Arguments) => infer Output
    ? Output extends Promise<infer R>
      ? (...args: Arguments) => Promise<R | null>
      : (...args: Arguments) => Output | null
    : never;

  export function validateFunction<T extends (...args: any[]) => any>(
    func: T,
  ): T extends (...args: infer Arguments) => infer Output
    ? Output extends Promise<infer R>
      ? (...args: Arguments) => Promise<IValidation<R>>
      : (...args: Arguments) => IValidation<Output>
    : never;
}

Also, when using assert functions, you can customize the error class to throw.

import typia from "typia";

class MyCustomError extends Error {
  public constructor(props: typia.TypeGuard.IProps);
}
typia.assert<number>("not-a-number", (props) => MyCustomError(props));

Additionally, checked that no problem on the new TypeScript v5.4 update.

What's Changed

New Contributors

Full Changelog: https://github.com/samchon/typia/compare/v5.4.14...v5.5.2