Comparing version 0.0.0-20240818T210419 to 0.0.0-20240818T210656
@@ -10,4 +10,5 @@ export * as Abi from './Abi.js'; | ||
export * as Rlp from './Rlp.js'; | ||
export * as TypedData from './TypedData.js'; | ||
export * as Types from './Types.js'; | ||
export * as Value from './Value.js'; | ||
//# sourceMappingURL=index.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Value = exports.Types = exports.Rlp = exports.Hex = exports.Hash = exports.Errors = exports.Data = exports.Bytes = exports.Caches = exports.Address = exports.Abi = void 0; | ||
exports.Value = exports.Types = exports.TypedData = exports.Rlp = exports.Hex = exports.Hash = exports.Errors = exports.Data = exports.Bytes = exports.Caches = exports.Address = exports.Abi = void 0; | ||
exports.Abi = require("./Abi.js"); | ||
@@ -13,4 +13,5 @@ exports.Address = require("./Address.js"); | ||
exports.Rlp = require("./Rlp.js"); | ||
exports.TypedData = require("./TypedData.js"); | ||
exports.Types = require("./Types.js"); | ||
exports.Value = require("./Value.js"); | ||
//# sourceMappingURL=index.js.map |
@@ -0,1 +1,4 @@ | ||
export type Compute<type> = { | ||
[key in keyof type]: type[key]; | ||
} & unknown; | ||
declare const symbol: unique symbol; | ||
@@ -26,8 +29,2 @@ export type Branded<T, U> = T & { | ||
export type PartialBy<T, K extends keyof T> = Omit<T, K> & ExactPartial<Pick<T, K>>; | ||
export type Prettify<T> = { | ||
[K in keyof T]: T[K]; | ||
} & {}; | ||
export type Evaluate<type> = { | ||
[key in keyof type]: type[key]; | ||
} & {}; | ||
export type RequiredBy<T, K extends keyof T> = Omit<T, K> & ExactRequired<Pick<T, K>>; | ||
@@ -40,3 +37,3 @@ export type Some<array extends readonly unknown[], value> = array extends readonly [value, ...unknown[]] ? true : array extends readonly [unknown, ...infer rest] ? Some<rest, value> : false; | ||
export type IsUnion<union, union2 = union> = union extends union2 ? ([union2] extends [union] ? false : true) : never; | ||
export type MaybePartial<type, enabled extends boolean | undefined> = enabled extends true ? Prettify<ExactPartial<type>> : type; | ||
export type MaybePartial<type, enabled extends boolean | undefined> = enabled extends true ? Compute<ExactPartial<type>> : type; | ||
export type ExactPartial<type> = { | ||
@@ -48,3 +45,3 @@ [key in keyof type]?: type[key] | undefined; | ||
}; | ||
export type OneOf<union extends object, fallback extends object | undefined = undefined, keys extends KeyofUnion<union> = KeyofUnion<union>> = union extends infer item ? Prettify<item & { | ||
export type OneOf<union extends object, fallback extends object | undefined = undefined, keys extends KeyofUnion<union> = KeyofUnion<union>> = union extends infer item ? Compute<item & { | ||
[key in Exclude<keys, keyof item>]?: fallback extends object ? key extends keyof fallback ? fallback[key] : undefined : undefined; | ||
@@ -54,3 +51,3 @@ }> : never; | ||
export type LooseOmit<type, keys extends string> = Pick<type, Exclude<keyof type, keys>>; | ||
export type UnionEvaluate<type> = type extends object ? Prettify<type> : type; | ||
export type UnionCompute<type> = type extends object ? Compute<type> : type; | ||
export type UnionLooseOmit<type, keys extends string> = type extends any ? LooseOmit<type, keys> : never; | ||
@@ -57,0 +54,0 @@ export type UnionOmit<type, keys extends keyof type> = type extends any ? Omit<type, keys> : never; |
@@ -1,2 +0,2 @@ | ||
export declare const version = "0.0.0-20240818T210419"; | ||
export declare const version = "0.0.0-20240818T210656"; | ||
//# sourceMappingURL=version.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.version = void 0; | ||
exports.version = '0.0.0-20240818T210419'; | ||
exports.version = '0.0.0-20240818T210656'; | ||
//# sourceMappingURL=version.js.map |
@@ -10,4 +10,5 @@ export * as Abi from './Abi.js'; | ||
export * as Rlp from './Rlp.js'; | ||
export * as TypedData from './TypedData.js'; | ||
export * as Types from './Types.js'; | ||
export * as Value from './Value.js'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -10,4 +10,5 @@ export * as Abi from './Abi.js'; | ||
export * as Rlp from './Rlp.js'; | ||
export * as TypedData from './TypedData.js'; | ||
export * as Types from './Types.js'; | ||
export * as Value from './Value.js'; | ||
//# sourceMappingURL=index.js.map |
@@ -0,1 +1,5 @@ | ||
/** Combines members of an intersection into a readable type. */ | ||
export type Compute<type> = { | ||
[key in keyof type]: type[key]; | ||
} & unknown; | ||
declare const symbol: unique symbol; | ||
@@ -118,17 +122,2 @@ /** | ||
/** | ||
* @description Combines members of an intersection into a readable type. | ||
* | ||
* @see {@link https://twitter.com/mattpocockuk/status/1622730173446557697?s=20&t=NdpAcmEFXY01xkqU3KO0Mg} | ||
* @example | ||
* Prettify<{ a: string } & { b: string } & { c: number, d: bigint }> | ||
* => { a: string, b: string, c: number, d: bigint } | ||
*/ | ||
export type Prettify<T> = { | ||
[K in keyof T]: T[K]; | ||
} & {}; | ||
/** @internal */ | ||
export type Evaluate<type> = { | ||
[key in keyof type]: type[key]; | ||
} & {}; | ||
/** | ||
* @description Creates a type that is T with the required keys K. | ||
@@ -163,3 +152,3 @@ * | ||
export type IsUnion<union, union2 = union> = union extends union2 ? ([union2] extends [union] ? false : true) : never; | ||
export type MaybePartial<type, enabled extends boolean | undefined> = enabled extends true ? Prettify<ExactPartial<type>> : type; | ||
export type MaybePartial<type, enabled extends boolean | undefined> = enabled extends true ? Compute<ExactPartial<type>> : type; | ||
export type ExactPartial<type> = { | ||
@@ -171,3 +160,3 @@ [key in keyof type]?: type[key] | undefined; | ||
}; | ||
export type OneOf<union extends object, fallback extends object | undefined = undefined, keys extends KeyofUnion<union> = KeyofUnion<union>> = union extends infer item ? Prettify<item & { | ||
export type OneOf<union extends object, fallback extends object | undefined = undefined, keys extends KeyofUnion<union> = KeyofUnion<union>> = union extends infer item ? Compute<item & { | ||
[key in Exclude<keys, keyof item>]?: fallback extends object ? key extends keyof fallback ? fallback[key] : undefined : undefined; | ||
@@ -181,3 +170,3 @@ }> : never; | ||
export type LooseOmit<type, keys extends string> = Pick<type, Exclude<keyof type, keys>>; | ||
export type UnionEvaluate<type> = type extends object ? Prettify<type> : type; | ||
export type UnionCompute<type> = type extends object ? Compute<type> : type; | ||
export type UnionLooseOmit<type, keys extends string> = type extends any ? LooseOmit<type, keys> : never; | ||
@@ -184,0 +173,0 @@ /** |
/** @internal */ | ||
export declare const version = "0.0.0-20240818T210419"; | ||
export declare const version = "0.0.0-20240818T210656"; | ||
//# sourceMappingURL=version.d.ts.map |
/** @internal */ | ||
export const version = '0.0.0-20240818T210419'; | ||
export const version = '0.0.0-20240818T210656'; | ||
//# sourceMappingURL=version.js.map |
@@ -10,3 +10,4 @@ export * as Abi from './Abi.js' | ||
export * as Rlp from './Rlp.js' | ||
export * as TypedData from './TypedData.js' | ||
export * as Types from './Types.js' | ||
export * as Value from './Value.js' |
@@ -0,3 +1,6 @@ | ||
/** Combines members of an intersection into a readable type. */ | ||
// https://twitter.com/mattpocockuk/status/1622730173446557697?s=20&t=NdpAcmEFXY01xkqU3KO0Mg | ||
export type Compute<type> = { [key in keyof type]: type[key] } & unknown | ||
declare const symbol: unique symbol | ||
/** | ||
@@ -158,19 +161,2 @@ * Creates a branded type of {@link T} with the brand {@link U}. | ||
/** | ||
* @description Combines members of an intersection into a readable type. | ||
* | ||
* @see {@link https://twitter.com/mattpocockuk/status/1622730173446557697?s=20&t=NdpAcmEFXY01xkqU3KO0Mg} | ||
* @example | ||
* Prettify<{ a: string } & { b: string } & { c: number, d: bigint }> | ||
* => { a: string, b: string, c: number, d: bigint } | ||
*/ | ||
export type Prettify<T> = { | ||
[K in keyof T]: T[K] | ||
} & {} | ||
/** @internal */ | ||
export type Evaluate<type> = { | ||
[key in keyof type]: type[key] | ||
} & {} | ||
/** | ||
* @description Creates a type that is T with the required keys K. | ||
@@ -239,3 +225,3 @@ * | ||
enabled extends boolean | undefined, | ||
> = enabled extends true ? Prettify<ExactPartial<type>> : type | ||
> = enabled extends true ? Compute<ExactPartial<type>> : type | ||
@@ -256,3 +242,3 @@ export type ExactPartial<type> = { | ||
> = union extends infer item | ||
? Prettify< | ||
? Compute< | ||
item & { | ||
@@ -284,3 +270,3 @@ [key in Exclude<keys, keyof item>]?: fallback extends object | ||
export type UnionEvaluate<type> = type extends object ? Prettify<type> : type | ||
export type UnionCompute<type> = type extends object ? Compute<type> : type | ||
@@ -287,0 +273,0 @@ export type UnionLooseOmit<type, keys extends string> = type extends any |
{ | ||
"name": "ox", | ||
"description": "Ethereum Standard Library", | ||
"version": "0.0.0-20240818T210419", | ||
"version": "0.0.0-20240818T210656", | ||
"main": "./_cjs/index.js", | ||
@@ -155,2 +155,12 @@ "module": "./_esm/index.js", | ||
}, | ||
"./TypedData": { | ||
"import": { | ||
"types": "./_esm/TypedData.d.ts", | ||
"default": "./_esm/TypedData.js" | ||
}, | ||
"default": { | ||
"types": "./_cjs/TypedData.d.ts", | ||
"default": "./_cjs/TypedData.js" | ||
} | ||
}, | ||
"./Types": { | ||
@@ -157,0 +167,0 @@ "import": { |
/** @internal */ | ||
export const version = '0.0.0-20240818T210419' | ||
export const version = '0.0.0-20240818T210656' |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
637714
613
10851