Skip to content

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

Latest
Compare
Choose a tag to compare
@KostyaTretyak KostyaTretyak released this 10 Aug 18:36
· 4 commits to main since this release

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();