From f1735e2d1b855e816f04894911855a9bae744c71 Mon Sep 17 00:00:00 2001 From: Daniel Rocha <68558152+danroc@users.noreply.github.com> Date: Sat, 19 Oct 2024 11:12:21 +0200 Subject: [PATCH] chore: rename `TypedInfer` to `InferEquals` --- packages/keyring-api/src/api/transaction.ts | 4 ++-- packages/keyring-api/src/superstruct.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/keyring-api/src/api/transaction.ts b/packages/keyring-api/src/api/transaction.ts index cf2401f..a98d089 100644 --- a/packages/keyring-api/src/api/transaction.ts +++ b/packages/keyring-api/src/api/transaction.ts @@ -14,7 +14,7 @@ import { CaipAssetTypeStruct, } from '@metamask/utils'; -import type { TypedInfer } from '../superstruct'; +import type { InferEquals } from '../superstruct'; import { object } from '../superstruct'; import type { Paginated } from '../utils'; import { StringNumberStruct, UuidStruct } from '../utils'; @@ -324,7 +324,7 @@ export const TransactionsPageStruct = object({ * * See {@link TransactionsPageStruct}. */ -export type TransactionsPage = TypedInfer< +export type TransactionsPage = InferEquals< typeof TransactionsPageStruct, Paginated >; diff --git a/packages/keyring-api/src/superstruct.ts b/packages/keyring-api/src/superstruct.ts index 4002699..a73a6a1 100644 --- a/packages/keyring-api/src/superstruct.ts +++ b/packages/keyring-api/src/superstruct.ts @@ -162,7 +162,7 @@ export function strictMask( * @param StructType - The struct type to infer. * @param ExpectedType - The expected type. */ -export type TypedInfer< +export type InferEquals< StructType extends Struct, ExpectedType, > = Equals, ExpectedType> extends true