typia

Super-fast/easy runtime validations and serializations through transformation

MIT License

Downloads
429.9K
Stars
4.4K
Committers
87

Bot releases are visible (Hide)

typia - v6.1.2

Published by samchon 4 months ago

What's Changed

Full Changelog: https://github.com/samchon/typia/compare/v6.1.1...v6.1.2

typia - v6.1.1

Published by samchon 4 months ago

What's Changed

Full Changelog: https://github.com/samchon/typia/compare/v6.1.0...v6.1.1

typia - v6.1.0

Published by samchon 4 months ago

Special thanks to @ryoppippi for plugin supporting.

From now on, you can use typia in below bundlers or compilers:

  • Bun
  • Esbuild
  • Farm
  • Next.js
  • Rolldown
  • Rollup
  • Rspack
  • Vite
  • Webpack

Detailed setup docs: https://typia.io/docs/setup/#unplugin-typia

What's Changed

Full Changelog: https://github.com/samchon/typia/compare/v6.0.6...v6.1.0

typia - v6.0.6

Published by samchon 5 months ago

What's Changed

New Contributors

Full Changelog: https://github.com/samchon/typia/compare/v6.0.5...v6.0.6

typia - v6.0.5

Published by samchon 5 months ago

What's Changed

Full Changelog: https://github.com/samchon/typia/compare/v6.0.4...v6.0.5

typia - v6.0.4

Published by samchon 5 months ago

What's Changed

New Contributors

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

typia - v6.0.3

Published by samchon 6 months ago

What's Changed

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

typia - v6.0.2

Published by samchon 6 months ago

What's Changed

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

typia - v6.0.1

Published by samchon 6 months 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

typia - v5.5.10

Published by samchon 7 months ago

What's Changed

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

typia - v5.5.8

Published by samchon 7 months ago

What's Changed

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

typia - v5.5.7

Published by samchon 7 months ago

What's Changed

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

typia - v5.5.5

Published by samchon 7 months ago

What's Changed

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

typia - v5.5.4

Published by samchon 7 months ago

What's Changed

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

typia - v5.5.3

Published by samchon 8 months ago

What's Changed

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

typia - v5.5.2

Published by samchon 8 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

typia - v5.4.14

Published by samchon 8 months ago

What's Changed

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

typia - v5.4.13

Published by samchon 8 months ago

What's Changed

New Contributors

Full Changelog: https://github.com/samchon/typia/compare/v5.4.12...v5.4.13

typia - v5.4.12

Published by samchon 8 months ago

What's Changed

Full Changelog: https://github.com/samchon/typia/compare/v5.4.10...v5.4.12

typia - v5.4.10

Published by samchon 8 months ago

What's Changed

New Contributors

Full Changelog: https://github.com/samchon/typia/compare/v5.4.9...v5.4.10

Package Rankings
Top 1.44% on Npmjs.org
Badges
Extracted from project README
GitHub license npm version Downloads Build Status Guide Documents Sponsers