UNPKG

@opra/common

Version:
17 lines (16 loc) 745 B
import type { Class, Type } from 'ts-gems'; import type { DataType } from './data-type.js'; /** * Create a new MappedType that picks given fields from base type * @param baseType * @param keys * @param options */ export declare function PickType<Args extends any[], Instance, Static, K extends keyof Instance>(baseType: Class<Args, Instance, Static>, keys: readonly K[], options?: DataType.Options): Class<Args, Pick<Instance, K>> & Omit<Pick<Static, keyof typeof baseType>, 'prototype' | 'constructor'>; /** * Create a new MappedType that picks given fields from base type * @param baseType * @param keys * @param options */ export declare function PickType(baseType: string | Type, keys: string[], options?: DataType.Options): Type;