Super-fast/easy runtime validations and serializations through transformation
MIT License
Bot releases are visible (Hide)
Published by samchon 4 months ago
@description
tag in JSON schema. by @samchon in https://github.com/samchon/typia/pull/1111
Full Changelog: https://github.com/samchon/typia/compare/v6.1.1...v6.1.2
Published by samchon 4 months ago
Full Changelog: https://github.com/samchon/typia/compare/v6.1.0...v6.1.1
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:
Detailed setup docs: https://typia.io/docs/setup/#unplugin-typia
typia
w/ unplugin-typia
by @ryoppippi in https://github.com/samchon/typia/pull/1074
unplugin-typia
to be main feature of setup guide docs by @samchon in https://github.com/samchon/typia/pull/1086
npm run test:bun
command. by @samchon in https://github.com/samchon/typia/pull/1095
randexp.js
) to ESM format on build by @ryoppippi in https://github.com/samchon/typia/pull/1099
Full Changelog: https://github.com/samchon/typia/compare/v6.0.6...v6.1.0
Published by samchon 5 months ago
UniqueItems<false>
case. by @samchon in https://github.com/samchon/typia/pull/1072
Full Changelog: https://github.com/samchon/typia/compare/v6.0.5...v6.0.6
Published by samchon 5 months ago
UniqueItems
. by @samchon in https://github.com/samchon/typia/pull/1066
Full Changelog: https://github.com/samchon/typia/compare/v6.0.4...v6.0.5
Published by samchon 5 months ago
@samchon/openapi
and revive benchmark program. by @samchon in https://github.com/samchon/typia/pull/1040
typedoc
) website by @samchon in https://github.com/samchon/typia/pull/1052
Full Changelog: https://github.com/samchon/typia/compare/v6.0.3...v6.0.4
Published by samchon 6 months ago
@samchon/openapi
on test program by @samchon in https://github.com/samchon/typia/pull/1032
@samchon/openapi
and fix comment tag @type
. by @samchon in https://github.com/samchon/typia/pull/1033
Full Changelog: https://github.com/samchon/typia/compare/v6.0.2...v6.0.3
Published by samchon 6 months ago
test/src/generated
by @samchon in https://github.com/samchon/typia/pull/1028
application_plugin()
function. by @samchon in https://github.com/samchon/typia/pull/1029
Full Changelog: https://github.com/samchon/typia/compare/v6.0.1...v6.0.2
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">();
Record<string, string>
bug of typia.json.application<"3.1">()
function. by @samchon in https://github.com/samchon/typia/pull/1025
Full Changelog: https://github.com/samchon/typia/compare/v5.5.10...v6.0.1
Published by samchon 7 months ago
Full Changelog: https://github.com/samchon/typia/compare/v5.5.8...v5.5.10
Published by samchon 7 months ago
Full Changelog: https://github.com/samchon/typia/compare/v5.5.7...v5.5.8
Published by samchon 7 months ago
Full Changelog: https://github.com/samchon/typia/compare/v5.5.5...v5.5.7
Published by samchon 7 months ago
Full Changelog: https://github.com/samchon/typia/compare/v5.5.4...v5.5.5
Published by samchon 7 months ago
Full Changelog: https://github.com/samchon/typia/compare/v5.5.3...v5.5.4
Published by samchon 8 months ago
Full Changelog: https://github.com/samchon/typia/compare/v5.5.2...v5.5.3
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.
typia.functional.assertFunction()
. by @samchon in https://github.com/samchon/typia/pull/989
isFunction()
and validateFunction()
. by @samchon in https://github.com/samchon/typia/pull/992
typia.functional
module for async or implicit return type case. by @samchon in https://github.com/samchon/typia/pull/994
functional
module when generation mode by @samchon in https://github.com/samchon/typia/pull/997
Full Changelog: https://github.com/samchon/typia/compare/v5.4.14...v5.5.2
Published by samchon 8 months ago
Full Changelog: https://github.com/samchon/typia/compare/v5.4.13...v5.4.14
Published by samchon 8 months ago
RandomGenerator.pattern()
. by @samchon in https://github.com/samchon/typia/pull/982
Full Changelog: https://github.com/samchon/typia/compare/v5.4.12...v5.4.13
Published by samchon 8 months ago
$string
function. by @samchon in https://github.com/samchon/typia/pull/975
IJsonSchema.title
inferencce. by @samchon in https://github.com/samchon/typia/pull/977
Full Changelog: https://github.com/samchon/typia/compare/v5.4.10...v5.4.12
Published by samchon 8 months ago
toJSON()
. by @samchon in https://github.com/samchon/typia/pull/972
Full Changelog: https://github.com/samchon/typia/compare/v5.4.9...v5.4.10