Skip to content

ApiMethods<TApi>

The function members of an API.

Import:

import type { ApiMethods } from '@mnaoumov/typescript-lib/api-contract';

Signature:

export type ApiMethods<TApi extends object>

Signature:

type ApiMethods<TApi> = {
[TKey in keyof TApi as TApi[TKey] extends (...arguments_: never) => unknown ? TKey : never]: TApi[TKey];
}

Type: { [TKey in keyof TApi as TApi[TKey] extends (…arguments_: never) => unknown ? TKey : never]: TApi[TKey]; }


Links to this page: