Skip to content

Commit

Permalink
fix(ertp): remove unneeded ertp type imports (#10467)
Browse files Browse the repository at this point in the history
closes: #XXXX
refs: #XXXX

## Description

For some reason, vscode does successfully highlight unused jsdoc type imports

![image](https://github.com/user-attachments/assets/8ba7670d-cde2-4458-b5dc-501b4b315414)

but `yarn lint` does not

![image](https://github.com/user-attachments/assets/1f4769f4-2f85-41f2-886b-9a0e6c5a0078)

This PR started as a drive-by extracted from #10456 , where I noticed that ERTP in particular had some of these. Since #10456 experiments with a variation on ERTP, simplifying it first in harmless ways helps a bit.

### Security Considerations

fewer distractions helps

### Scaling Considerations

none

### Documentation Considerations

none

### Testing Considerations

none

### Upgrade Considerations

In the agoric-sdk repo there are no remaining type imports of the legacy type reexport of `Baggage` from ertp. But if there are such imports in other repos, they will need to be fixed. But this is a static-only issue, not a runtime issue, so it's fine for those repos to be fixed only once they depend on the new `@agoric/ertp` without that legacy reexport.
  • Loading branch information
erights authored Nov 14, 2024
1 parent d727cf9 commit e96ff82
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 11 deletions.
2 changes: 1 addition & 1 deletion packages/ERTP/src/amountStore.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { AmountMath } from './amountMath.js';

/** @import {Amount, AssetKind, AmountValue, AssetKindForValue, AssetValueForKind, Brand, MathHelpers} from './types.js' */
/** @import {Amount, AssetKind} from './types.js' */

/**
* @template {AssetKind} [K=AssetKind]
Expand Down
7 changes: 0 additions & 7 deletions packages/ERTP/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,5 @@ export * from './amountMath.js';
export * from './issuerKit.js';
export * from './typeGuards.js';

/**
* Importing Baggage from `@agoric/ertp` is deprecated. Import Baggage from
* `@agoric/vat-data` instead
*
* @import {Baggage} from '@agoric/vat-data'
*/

// eslint-disable-next-line import/export
export * from './types-index.js';
2 changes: 1 addition & 1 deletion packages/ERTP/src/legacy-payment-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { AmountMath } from './amountMath.js';

/**
* @import {ERef} from '@endo/far';
* @import {Amount, AssetKind, AmountValue, AssetKindForValue, Payment, Brand, Purse} from './types.js';
* @import {Amount, AssetKind, Payment, Purse} from './types.js';
*/

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/ERTP/src/purse.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { AmountMath } from './amountMath.js';
import { makeTransientNotifierKit } from './transientNotifier.js';
import { makeAmountStore } from './amountStore.js';

/** @import {Amount, AssetKind, AmountValue, AssetKindForValue, RecoverySetsOption, Brand, Payment} from './types.js' */
/** @import {AssetKind, RecoverySetsOption, Brand, Payment} from './types.js' */

const EMPTY_COPY_SET = makeCopySet([]);

Expand Down
2 changes: 1 addition & 1 deletion packages/ERTP/src/transientNotifier.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { makeNotifierKit } from '@agoric/notifier';

/**
* @import {Purse} from './types.js';
* @import {LatestTopic, NotifierRecord} from '@agoric/notifier';
* @import {NotifierRecord} from '@agoric/notifier';
*/

// Note: Virtual for high cardinality, but *not* durable, and so
Expand Down

0 comments on commit e96ff82

Please sign in to comment.