import { ConstructorSpec , TypeSpec } from "contract-metadata/src" ; import { NamedTypeNodeDef } from "../contract/typedef" ; import { KeySelector } from "../preprocess/selector" ; export class MetadataUtil { static createTypeSpec ( type ) { if ( type ) { return new TypeSpec ( type . index , type . plainType ) ; } else { return null ; } } static createDefaultCntr ( ) { let selector = new KeySelector ( "new" ) ; return new ConstructorSpec ( [ selector . key ] , selector . short , [ ] , [ "" ] ) ; } }