viem 0.0.0-main.20230622T050820 → 0.0.0-main.20230622T230209
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/errors/version.js +1 -1
- package/dist/esm/errors/version.js +1 -1
- package/dist/types/errors/version.d.ts +1 -1
- package/dist/types/types/utils.d.ts +7 -3
- package/dist/types/types/utils.d.ts.map +1 -1
- package/dist/types/utils/formatters/transaction.d.ts +1 -1
- package/dist/types/utils/formatters/transactionRequest.d.ts +1 -1
- package/package.json +1 -1
- package/src/errors/version.ts +1 -1
- package/src/types/utils.ts +12 -7
@@ -1,2 +1,2 @@
|
|
1
|
-
export const version = '0.0.0-main.
|
1
|
+
export const version = '0.0.0-main.20230622T230209';
|
2
2
|
//# sourceMappingURL=version.js.map
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export declare const version = "0.0.0-main.
|
1
|
+
export declare const version = "0.0.0-main.20230622T230209";
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
@@ -88,6 +88,12 @@ export type MaybeRequired<T, TRequired extends boolean> = TRequired extends true
|
|
88
88
|
* => string
|
89
89
|
*/
|
90
90
|
export type MaybeUndefined<T, TUndefinedish extends boolean> = TUndefinedish extends true ? T | undefined : T;
|
91
|
+
/**
|
92
|
+
* @private Helper for `Assign`. This is a workaround for tsc generating errorneous type definitions.
|
93
|
+
*/
|
94
|
+
export type Assign_<T, U> = {
|
95
|
+
[K in keyof T as K extends keyof U ? U[K] extends void ? never : K : K]: K extends keyof U ? U[K] : T[K];
|
96
|
+
};
|
91
97
|
/**
|
92
98
|
* @description Assigns the properties of U onto T.
|
93
99
|
*
|
@@ -95,9 +101,7 @@ export type MaybeUndefined<T, TUndefinedish extends boolean> = TUndefinedish ext
|
|
95
101
|
* Assign<{ a: string, b: number }, { a: undefined, c: boolean }>
|
96
102
|
* => { a: undefined, b: number, c: boolean }
|
97
103
|
*/
|
98
|
-
export type Assign<T, U> =
|
99
|
-
[K in keyof T as K extends keyof U ? U[K] extends void ? never : K : K]: K extends keyof U ? U[K] : T[K];
|
100
|
-
} & U;
|
104
|
+
export type Assign<T, U> = Assign_<T, U> & U;
|
101
105
|
/**
|
102
106
|
* @description Makes nullable properties from T optional.
|
103
107
|
*
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/types/utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,MAAM,MAAM,MAAM,CAChB,CAAC,SAAS,SAAS,OAAO,EAAE,EAC5B,CAAC,EACD,GAAG,SAAS,SAAS,OAAO,EAAE,GAAG,EAAE,IACjC,CAAC,SAAS,SAAS,CAAC,MAAM,CAAC,EAAE,GAAG,MAAM,IAAI,SAAS,SAAS,OAAO,EAAE,CAAC,GACtE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GACb,MAAM,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC,GAC5B,MAAM,CAAC,IAAI,EAAE,CAAC,EAAE,GAAG,CAAC,GACtB,SAAS,CAAC,GAAG,GAAG,CAAC,CAAA;AAErB;;;;;;;GAOG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,EAAE,CAAC,IAAI,OAAO,CACtC,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC,CAC5D,SAAS,IAAI,GACV,KAAK,GACL,IAAI,CAAA;AAER;;;;;;GAMG;AACH,MAAM,MAAM,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,IAAI,GAAG,KAAK,CAAA;AAE3D;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,EAAE,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,IAAK,CAAC,SAAS,SAAS;IACjE,MAAM,IAAI;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,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;AAE9E;;;;;;;GAOG;AACH,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI;KACvB,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACrB,GAAG,EAAE,CAAA;AAEN,KAAK,QAAQ,CAAC,CAAC,EAAE,KAAK,SAAS,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,GAAG,KAAK,GAAG,MAAM,CAAC,EAAE,GACzE,QAAQ,CAAC,CAAC,CAAC,GACX,CAAC,CAAA;AACL,KAAK,SAAS,CAAC,CAAC,EAAE,KAAK,SAAS,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,GAAG,KAAK,EAAE,GAC1E,SAAS,CAAC,CAAC,CAAC,GACZ,CAAC,CAAA;AAEL;;;;;;GAMG;AACH,MAAM,MAAM,UAAU,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;AAEhF;;;;;;GAMG;AACH,MAAM,MAAM,IAAI,CAAC,CAAC,EAAE,KAAK,SAAS,MAAM,GAAG,GAAG,IAAI,QAAQ,CACxD,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,EACnB,KAAK,CACN,CAAA;AAED;;;;;;GAMG;AACH,MAAM,MAAM,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA"}
|
@@ -13,7 +13,7 @@ export declare const defineTransaction: <TOverrideParameters, TOverrideReturnTyp
|
|
13
13
|
exclude?: TExclude | undefined;
|
14
14
|
format: (_: TOverrideParameters) => TOverrideReturnType;
|
15
15
|
}) => {
|
16
|
-
format: (args: Partial<RpcTransaction> & TOverrideParameters) => ((
|
16
|
+
format: (args: Partial<RpcTransaction> & TOverrideParameters) => ((import("../../types/utils.js").Assign_<import("../../types/transaction.js").TransactionLegacy<bigint, number, "legacy">, TOverrideReturnType> & TOverrideReturnType extends infer T ? { [K in keyof T]: (import("../../types/utils.js").Assign_<import("../../types/transaction.js").TransactionLegacy<bigint, number, "legacy">, TOverrideReturnType> & TOverrideReturnType)[K]; } : never) | (import("../../types/utils.js").Assign_<import("../../types/transaction.js").TransactionEIP2930<bigint, number, "eip2930">, TOverrideReturnType> & TOverrideReturnType extends infer T_1 ? { [K_1 in keyof T_1]: (import("../../types/utils.js").Assign_<import("../../types/transaction.js").TransactionEIP2930<bigint, number, "eip2930">, TOverrideReturnType> & TOverrideReturnType)[K_1]; } : never) | (import("../../types/utils.js").Assign_<import("../../types/transaction.js").TransactionEIP1559<bigint, number, "eip1559">, TOverrideReturnType> & TOverrideReturnType extends infer T_2 ? { [K_2 in keyof T_2]: (import("../../types/utils.js").Assign_<import("../../types/transaction.js").TransactionEIP1559<bigint, number, "eip1559">, TOverrideReturnType> & TOverrideReturnType)[K_2]; } : never)) & { [K_3 in TExclude[number]]: never; };
|
17
17
|
type: "transaction";
|
18
18
|
};
|
19
19
|
//# sourceMappingURL=transaction.d.ts.map
|
@@ -8,7 +8,7 @@ export declare const defineTransactionRequest: <TOverrideParameters, TOverrideRe
|
|
8
8
|
exclude?: TExclude | undefined;
|
9
9
|
format: (_: TOverrideParameters) => TOverrideReturnType;
|
10
10
|
}) => {
|
11
|
-
format: (args: Partial<TransactionRequest> & TOverrideParameters) => ((
|
11
|
+
format: (args: Partial<TransactionRequest> & TOverrideParameters) => ((import("../../types/utils.js").Assign_<import("../../types/transaction.js").TransactionRequestLegacy<`0x${string}`, `0x${string}`>, TOverrideReturnType> & TOverrideReturnType extends infer T ? { [K in keyof T]: (import("../../types/utils.js").Assign_<import("../../types/transaction.js").TransactionRequestLegacy<`0x${string}`, `0x${string}`>, TOverrideReturnType> & TOverrideReturnType)[K]; } : never) | (import("../../types/utils.js").Assign_<import("../../types/transaction.js").TransactionRequestEIP2930<`0x${string}`, `0x${string}`>, TOverrideReturnType> & TOverrideReturnType extends infer T_1 ? { [K_1 in keyof T_1]: (import("../../types/utils.js").Assign_<import("../../types/transaction.js").TransactionRequestEIP2930<`0x${string}`, `0x${string}`>, TOverrideReturnType> & TOverrideReturnType)[K_1]; } : never) | (import("../../types/utils.js").Assign_<import("../../types/transaction.js").TransactionRequestEIP1559<`0x${string}`, `0x${string}`>, TOverrideReturnType> & TOverrideReturnType extends infer T_2 ? { [K_2 in keyof T_2]: (import("../../types/utils.js").Assign_<import("../../types/transaction.js").TransactionRequestEIP1559<`0x${string}`, `0x${string}`>, TOverrideReturnType> & TOverrideReturnType)[K_2]; } : never)) & { [K_3 in TExclude[number]]: never; };
|
12
12
|
type: "transactionRequest";
|
13
13
|
};
|
14
14
|
//# sourceMappingURL=transactionRequest.d.ts.map
|
package/package.json
CHANGED
package/src/errors/version.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export const version = '0.0.0-main.
|
1
|
+
export const version = '0.0.0-main.20230622T230209'
|
package/src/types/utils.ts
CHANGED
@@ -122,20 +122,25 @@ export type MaybeUndefined<
|
|
122
122
|
> = TUndefinedish extends true ? T | undefined : T
|
123
123
|
|
124
124
|
/**
|
125
|
-
* @
|
126
|
-
*
|
127
|
-
* @example
|
128
|
-
* Assign<{ a: string, b: number }, { a: undefined, c: boolean }>
|
129
|
-
* => { a: undefined, b: number, c: boolean }
|
125
|
+
* @private Helper for `Assign`. This is a workaround for tsc generating errorneous type definitions.
|
130
126
|
*/
|
131
|
-
export type
|
127
|
+
export type Assign_<T, U> = {
|
132
128
|
[K in
|
133
129
|
keyof T as K extends keyof U
|
134
130
|
? U[K] extends void
|
135
131
|
? never
|
136
132
|
: K
|
137
133
|
: K]: K extends keyof U ? U[K] : T[K]
|
138
|
-
}
|
134
|
+
}
|
135
|
+
|
136
|
+
/**
|
137
|
+
* @description Assigns the properties of U onto T.
|
138
|
+
*
|
139
|
+
* @example
|
140
|
+
* Assign<{ a: string, b: number }, { a: undefined, c: boolean }>
|
141
|
+
* => { a: undefined, b: number, c: boolean }
|
142
|
+
*/
|
143
|
+
export type Assign<T, U> = Assign_<T, U> & U
|
139
144
|
|
140
145
|
/**
|
141
146
|
* @description Makes nullable properties from T optional.
|