UNPKG

@helios-lang/compiler

Version:

Helios is a Domain Specific Language that compiles to Plutus-Core (i.e. Cardano on-chain validator scripts). Helios is a non-Haskell alternative to Plutus. With this library you can compile Helios scripts and build Cardano transactions, all you need to bu

107 lines 3.61 kB
/** * @typedef {import("@helios-lang/compiler-utils").Site} Site * @typedef {import("./common.js").DataType} DataType * @typedef {import("./common.js").EnumMemberType} EnumMemberType * @typedef {import("./common.js").GenericTypeProps} GenericTypeProps * @typedef {import("./common.js").GenericEnumMemberTypeProps} GenericEnumMemberTypeProps * @typedef {import("./common.js").Named} Named * @typedef {import("./common.js").Parametric} Parametric * @typedef {import("./common.js").Type} Type * @typedef {import("./common.js").Typed} Typed * @typedef {import("./common.js").InstanceMembers} InstanceMembers * @typedef {import("./common.js").TypeMembers} TypeMembers * @typedef {import("./common.js").InferenceMap} InferenceMap */ /** * @param {Type[]} itemTypes * @returns {Type} */ export function IteratorType$(itemTypes: Type[]): Type; /** * TODO: rename DataType to something else * @param {Type} type * @return {boolean} */ export function isDataType(type: Type): boolean; /** * @param {Type[]} itemTypes * @param {boolean | null} isAllDataTypes - if the all the itemTypes are known datatypes, then don't check that here (could lead to infinite recursion) * @returns {Type} */ export function TupleType$(itemTypes: Type[], isAllDataTypes?: boolean | null): Type; /** * Returns null if `type` isn't a tuple * @param {Type} type * @returns {Type[] | undefined} */ export function getTupleItemTypes(type: Type): Type[] | undefined; /** * Expand tuples in posArgs, if that matches argTypes better * @param {FuncType} funcType * @param {Typed[]} posArgs * @returns {Typed[]} */ export function expandTuplesInPosArgs(funcType: FuncType, posArgs: Typed[]): Typed[]; /** * @param {Type} itemType * @returns {DataType} */ export function ListType$(itemType: Type): DataType; /** * @param {Type} keyType * @param {Type} valueType * @returns {DataType} */ export function MapType$(keyType: Type, valueType: Type): DataType; /** * @internal * @param {Type} someType * @returns {DataType} */ export function OptionType$(someType: Type): DataType; /** * @implements {DataType} */ export class TupleType extends GenericType implements DataType { /** * @param {GenericTypeProps} props * @param {Type[]} itemTypes */ constructor(props: GenericTypeProps, itemTypes: Type[]); /** * @private * @readonly * @type {Type[]} */ private readonly _itemTypes; /** * @type {Type[]} */ get itemTypes(): import("./common.js").Type[]; } /** * Builtin list type * @type {Parametric} */ export const ListType: Parametric; /** * Builtin map type (in reality list of key-value pairs) * @internal * @type {Parametric} */ export const MapType: Parametric; export type Site = import("@helios-lang/compiler-utils").Site; export type DataType = import("./common.js").DataType; export type EnumMemberType = import("./common.js").EnumMemberType; export type GenericTypeProps = import("./common.js").GenericTypeProps; export type GenericEnumMemberTypeProps = import("./common.js").GenericEnumMemberTypeProps; export type Named = import("./common.js").Named; export type Parametric = import("./common.js").Parametric; export type Type = import("./common.js").Type; export type Typed = import("./common.js").Typed; export type InstanceMembers = import("./common.js").InstanceMembers; export type TypeMembers = import("./common.js").TypeMembers; export type InferenceMap = import("./common.js").InferenceMap; import { FuncType } from "./common.js"; import { GenericType } from "./common.js"; //# sourceMappingURL=containers.d.ts.map