diff --git a/src/types.ts b/src/types.ts index 1773036..2fdae58 100644 --- a/src/types.ts +++ b/src/types.ts @@ -6,6 +6,8 @@ import { RemapApiHref } from 'moysklad-api-model' +import { getHelpers } from './index' + export interface Meta { type: T href: string @@ -95,3 +97,5 @@ export type HrefMetaType = ? 'pricetype' : never + +export type Helpers = ReturnType diff --git a/tests/types/commom.ts b/tests/types/commom.ts index 889f460..a8adde9 100644 --- a/tests/types/commom.ts +++ b/tests/types/commom.ts @@ -1,6 +1,6 @@ import Moysklad from 'moysklad' import { EntityRef, Patch } from 'moysklad-api-model' -import { getHelpers } from '../../src' +import { getHelpers, Helpers } from '../../src' import { noop, testTypeEqual } from '../tools' const ms = Moysklad() @@ -15,3 +15,7 @@ const orderPatch: Patch<'customerorder'> = { testTypeEqual>(ref('foo')) noop(orderPatch) + +const helpers = {} as Helpers + +helpers.href('entity/customerorder')