Typescript 如何使用带有两个扩展参数的接口?

Typescript 如何使用带有两个扩展参数的接口?,typescript,typescript-typings,typescript-generics,Typescript,Typescript Typings,Typescript Generics,在react表中使用typescript时,我试图理解代码,我遇到了这些类型的接口 export interface TableInstance<D extends object = {}> extends Omit<TableOptions<D>, 'columns' | 'pageCount'>, UseTableInstanceProps<D> {} 省略、拾取和排除是有文档记录的TypeScript实用程序类型

在react表中使用typescript时,我试图理解代码,我遇到了这些类型的接口

 export interface TableInstance<D extends object = {}>
    extends Omit<TableOptions<D>, 'columns' | 'pageCount'>,
        UseTableInstanceProps<D> {}

省略、拾取和排除是有文档记录的TypeScript实用程序类型


因此,react表正在创建自己的Omit版本,即它与TypeScript实用程序类型不同。至于“keyof”关键字,请参阅。

我的回答有帮助吗?
    export function useTable<D extends object = {}>(
    options: TableOptions<D>,
    ...plugins: Array<PluginHook<D>>
): TableInstance<D>;
/**
 * Construct a type with the properties of T except for those in type K.
 */
type Omit<T, K extends keyof any> = Pick<T, Exclude<keyof T, K>>;