UNPKG

typia

Version:

Superfast runtime validators with only one line

13 lines (11 loc) 378 B
import { IJsDocTagInfo } from "../../schemas/metadata/IJsDocTagInfo"; export const json_schema_description = (props: { description?: string | null | undefined; jsDocTags?: IJsDocTagInfo[]; }): string | undefined => props.jsDocTags ?.find((tag) => tag.name === "description") ?.text?.[0]?.text?.split("\r\n") .join("\n") ?? props.description ?? undefined;