Skip to content

Releases: samchon/typia

v5.5.4

11 Mar 16:05
9b1737b
Compare
Choose a tag to compare

What's Changed

Full Changelog: v5.5.3...v5.5.4

v5.5.3

07 Mar 19:20
28b7489
Compare
Choose a tag to compare

What's Changed

Full Changelog: v5.5.2...v5.5.3

v5.5.2

07 Mar 11:43
Compare
Choose a tag to compare

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: v5.4.14...v5.5.2

v5.4.14

29 Feb 18:22
1d2fbfc
Compare
Choose a tag to compare

What's Changed

  • Fix constant and tagged atomic type case. by @samchon in #983

Full Changelog: v5.4.13...v5.4.14

v5.4.13

27 Feb 15:16
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v5.4.12...v5.4.13

v5.4.12

23 Feb 14:36
cefa989
Compare
Choose a tag to compare

What's Changed

Full Changelog: v5.4.10...v5.4.12

v5.4.10

19 Feb 19:35
d167cac
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v5.4.9...v5.4.10

v5.4.9

15 Feb 14:36
6e6290f
Compare
Choose a tag to compare

What's Changed

Full Changelog: v5.4.8...v5.4.9

v5.4.8

09 Feb 15:15
2cf31d7
Compare
Choose a tag to compare

What's Changed

Full Changelog: v5.4.7...v5.4.8

v5.4.7

07 Feb 21:07
237f4da
Compare
Choose a tag to compare

What's Changed

Full Changelog: v5.4.6...v5.4.7