UNPKG

@mysten/utils

Version:
14 lines (11 loc) 319 B
// Copyright (c) Mysten Labs, Inc. // SPDX-License-Identifier: Apache-2.0 export type Simplify<T> = { [K in keyof T]: T[K]; // eslint-disable-next-line @typescript-eslint/ban-types } & {}; export type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends ( k: infer I, ) => void ? I : never;