From 1ec232239ee69878da10e47631de438b23588235 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Fri, 10 Jan 2025 07:39:38 -0800 Subject: [PATCH] refactor(types): "TypeTag" --- packages/ERTP/src/types.ts | 4 ++-- packages/internal/src/tagged.d.ts | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/ERTP/src/types.ts b/packages/ERTP/src/types.ts index feddaa78d2b..4e8a28785c5 100644 --- a/packages/ERTP/src/types.ts +++ b/packages/ERTP/src/types.ts @@ -2,7 +2,7 @@ import type { LatestTopic } from '@agoric/notifier'; import type { ERef } from '@endo/far'; import type { RemotableObject } from '@endo/pass-style'; import type { CopyBag, CopySet, Key, Pattern } from '@endo/patterns'; -import type { Tagged } from '@agoric/internal/src/tagged.js'; +import type { TypeTag } from '@agoric/internal/src/tagged.js'; import type { AssetKind } from './amountMath.js'; export type { AssetKind } from './amountMath.js'; @@ -407,7 +407,7 @@ export type Payment< K extends AssetKind = AssetKind, M extends Key = Key, > = RemotableObject & - Tagged< + TypeTag< { /** * Get the allegedBrand, indicating diff --git a/packages/internal/src/tagged.d.ts b/packages/internal/src/tagged.d.ts index c5cc24e9728..7d8a85f8a14 100644 --- a/packages/internal/src/tagged.d.ts +++ b/packages/internal/src/tagged.d.ts @@ -1,4 +1,7 @@ -/** @file adapted from https://raw.githubusercontent.com/sindresorhus/type-fest/main/source/opaque.d.ts */ +/** @file adapted from https://raw.githubusercontent.com/sindresorhus/type-fest/main/source/tagged.d.ts */ + +// different name to avoid confusion with pass-style "tagged" +export { Tagged as TypeTag }; declare const tag: unique symbol;