github samchon/typia v5.1.1

latest releases: v6.12.0, v6.11.4, v6.11.3...
13 months ago

New module http has been newly added.

export namespace http {
    export function parameter<T extends boolean | bigint | number | string>(input: string): T;

    export function headers<T extends object>(input: Record<string, string | string[] | undefined>): Resolved<T>;
    export function isHeaders<T extends object>(input: Record<string, string | string[] | undefined>): Resolved<T> | null;
    export function assertHeaders<T extends object>(input: Record<string, string | string[] | undefined>): Resolved<T>;
    export function validateHeaders<T extends object>(input: Record<string, string | string[] | undefined>): IValidation<Resolved<T>>;

    export function query<T extends object>(input: URLSearchParams): Resolved<T>;
    export function isQuery<T extends object>(input: URLSearchParams): Resolved<T> | null;
    export function assertQuery<T extends object>(input: URLSearchParams): Resolved<T>;
    export function validateQuery<T extends object>(input: URLSearchParams): IValidation<Resolved<T>>;
}

For reference, those features had been developed in @nestia/core for a long time.

The reason why migrating them from @nestia/core is to support Fastify plugin like nestia case.

What's Changed

  • Change naming strategy of swagger components. by @samchon in #818
  • Close #815 - new module http - query, headeres and parameter by @samchon in #819

Full Changelog: v5.0.5...v5.1.1

Don't miss a new typia release

NewReleases is sending notifications on new releases.