@polkadot/types
Version:
Implementation of the Parity codec
11 lines (10 loc) • 384 B
JavaScript
import { createTypeUnsafe } from '@polkadot/types-create';
/**
* Create an instance of a `type` with a given `params`.
* @param type - A recognizable string representing the type to create an
* instance from
* @param params - The value to instantiate the type with
*/
export function createType(registry, type, ...params) {
return createTypeUnsafe(registry, type, params);
}