We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent be32399 commit 5ce5f56Copy full SHA for 5ce5f56
1 file changed
src/types/contract/base.ts
@@ -10,11 +10,15 @@ import {
10
/**
11
* The result of a call to a transaction / get function.
12
*/
13
-export type Result<T, HasTxHash extends boolean = false> = {
14
- data: T
15
-} & (HasTxHash extends true
16
- ? { transactionHash: Address }
17
- : Record<string, never>)
+export type Result<
+ T,
+ HasTxHash extends boolean = false,
+> = HasTxHash extends true
+ ? {
18
+ data: T
19
+ transactionHash: Address
20
+ }
21
+ : { data: T }
22
23
24
* @description Construct a type with the properties of union type T except for those in type K.
0 commit comments