@harmoniclabs/plu-ts-onchain
Version:
An embedded DSL for Cardano smart contracts creation coupled with a library for Cardano transactions, all in Typescript
26 lines (25 loc) • 914 B
TypeScript
import type { Methods } from "../../../../type_system/index.js";
/**
* checks thatevery method name does not have an equivalent that starts with "p"
* (added by convention to indicate the term rather than the funciton)
*
* @example
* ```ts
* const notOk: Methods = {
* foo: pfn([ int ], bool)( ... ),
* bar: pfn([ int ], bool)( ... ),
* // ERROR: 'pfoo' is used to indicate the term counterpart of 'foo'
* pfoo: pfn([ int ], bool)( ... )
* }
* const ok: Methods = {
* foo: pfn([ int ], bool)( ... ),
* bar: pfn([ int ], bool)( ... ),
* // no problem
* // this will generate 'prop' and 'pprop'
* // where 'prop' is the funciton and 'pprop' is the term
* prop: pfn([ int ], bool)( ... )
* }
* ```
*/
export declare function isWellFormedMethods(methods: Methods): boolean;
export declare function assertWellFormedMethods(methods: Methods): void;