Skip to content

Releases: ts-stack/body-parser

@ts-stack/body-parser v1.2.0 released!

10 Aug 18:36
Compare
Choose a tag to compare

The location of the typed parameter has been changed. The parameter is now specified for a specific parser rather than for a parser factory:

Now:

import { getJsonParser } from '@ts-stack/body-parser';
import { InterfaceOfBody } from './types';

const jsonParser = getJsonParser();
const body = await jsonParser<InterfaceOfBody>();

Before:

import { getJsonParser } from '@ts-stack/body-parser';
import { InterfaceOfBody } from './types';

const jsonParser = getJsonParser<InterfaceOfBody>();
const body = await jsonParser();