Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/polkadot/mod.ts>types.createType

Package publishing for deno.land/x/polkadot
Go to Latest
function types.createType
import { types } from "https://deno.land/x/polkadot@0.2.27/mod.ts";
const { createType } = types;

Create an instance of a type with a given params.

Type Parameters

optional
T extends Codec = Codec
optional
K extends string = string

Parameters

registry: Registry
  • A recognizable string representing the type to create an instance from
type: K
  • The value to instantiate the type with
...params: unknown[]

Returns

DetectCodec<T, K>