UNPKG

@harmoniclabs/plu-ts-onchain

Version:

An embedded DSL for Cardano smart contracts creation coupled with a library for Cardano transactions, all in Typescript

12 lines (11 loc) 961 B
import type { PType } from "../../PType/index.js"; import type { PAlias } from "../../PTypes/PAlias/palias.js"; import type { TermAlias } from "../std/UtilityTerms/TermAlias.js"; import { Term } from "../../Term/index.js"; import { UtilityTermOf } from "../std/UtilityTerms/addUtilityForType.js"; export type LettedTerm<PVarT extends PType, SomeExtension extends object> = Term<PVarT> & SomeExtension extends Term<PAlias<PVarT, {}>> ? TermAlias<PVarT, {}> & SomeExtension & { in: <PExprResult extends PType>(expr: (value: TermAlias<PVarT, {}> & SomeExtension) => Term<PExprResult>) => UtilityTermOf<PExprResult>; } : UtilityTermOf<PVarT> & { in: <PExprResult extends PType>(expr: (value: UtilityTermOf<PVarT>) => Term<PExprResult>) => UtilityTermOf<PExprResult>; }; export declare function plet<PVarT extends PType, SomeExtension extends object>(varValue: Term<PVarT> & SomeExtension, value_name?: string | undefined): LettedTerm<PVarT, SomeExtension>;