UNPKG

384 BJavaScriptView Raw
1import { createTypeUnsafe } from '@polkadot/types-create';
2/**
3 * Create an instance of a `type` with a given `params`.
4 * @param type - A recognizable string representing the type to create an
5 * instance from
6 * @param params - The value to instantiate the type with
7 */
8export function createType(registry, type, ...params) {
9 return createTypeUnsafe(registry, type, params);
10}