Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 | 2x 2x 2x 2x | import { validationToType } from 'yaschva'
import { OutputSuccess } from '../transform/types.js'
export const capitalize = (s: string) => s.charAt(0).toUpperCase() + s.slice(1)
export const name = (x: OutputSuccess): string => `${x.name}${capitalize(x.method)}`
export const typeDef = (contracts: OutputSuccess[]): string =>
contracts.map(x =>
`/** ${x.name} types for ${x.method} method **/
export type ${name(x)}Argument = ${validationToType(x.arguments)}
export type ${name(x)}Returns = ${validationToType(x.returns)}\n`).join('\n')
|