Skip to content

Commit

Permalink
fix: make TFunction type augmentable (#2279)
Browse files Browse the repository at this point in the history
  • Loading branch information
masnormen authored Jan 6, 2025
1 parent dd78378 commit 009c457
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion typescript/t.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,12 @@ interface TFunctionNonStrict<Ns extends Namespace = DefaultNamespace, KPrefix =
): TFunctionReturnOptionalDetails<TFunctionProcessReturnValue<$NoInfer<Ret>, DefaultValue>, TOpt>;
}

export type TFunction<
type TFunctionSignature<
Ns extends Namespace = DefaultNamespace,
KPrefix = undefined,
> = _StrictKeyChecks extends true ? TFunctionStrict<Ns, KPrefix> : TFunctionNonStrict<Ns, KPrefix>;

export interface TFunction<Ns extends Namespace = DefaultNamespace, KPrefix = undefined>
extends TFunctionSignature<Ns, KPrefix> {}

export type KeyPrefix<Ns extends Namespace> = ResourceKeys<true>[$FirstNamespace<Ns>] | undefined;

0 comments on commit 009c457

Please sign in to comment.