@agoric/time 0.3.3-u17.1 → 0.3.3-u18.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  export * from './src/timeMath.js';
2
2
  export * from './src/typeGuards.js';
3
3
  // eslint-disable-next-line import/export -- just types
4
- export * from './src/types.js';
4
+ export * from './src/types-index.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agoric/time",
3
- "version": "0.3.3-u17.1",
3
+ "version": "0.3.3-u18.1",
4
4
  "description": "Timestamps, time math, timer service API definition",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -31,14 +31,14 @@
31
31
  },
32
32
  "homepage": "https://github.com/Agoric/agoric-sdk#readme",
33
33
  "dependencies": {
34
- "@agoric/store": "^0.9.3-u17.1",
35
- "@endo/errors": "^1.2.5",
36
- "@endo/nat": "^5.0.10",
37
- "@endo/patterns": "^1.4.3"
34
+ "@agoric/store": "^0.9.3-u18.1",
35
+ "@endo/errors": "^1.2.8",
36
+ "@endo/nat": "^5.0.13",
37
+ "@endo/patterns": "^1.4.7"
38
38
  },
39
39
  "devDependencies": {
40
- "@endo/far": "^1.1.5",
41
- "@endo/init": "^1.1.4",
40
+ "@endo/far": "^1.1.9",
41
+ "@endo/init": "^1.1.7",
42
42
  "ava": "^5.3.0"
43
43
  },
44
44
  "ava": {
@@ -58,7 +58,7 @@
58
58
  "access": "public"
59
59
  },
60
60
  "typeCoverage": {
61
- "atLeast": 88.72
61
+ "atLeast": 88.75
62
62
  },
63
- "gitHead": "5259430561693bfcf58516c3ea54123895859708"
63
+ "gitHead": "f8c45b8a2e29a51522a81a6692af25b2d7f6b50f"
64
64
  }
package/src/typeGuards.js CHANGED
@@ -6,25 +6,30 @@ import { M } from '@endo/patterns';
6
6
  */
7
7
 
8
8
  export const TimerBrandShape = M.remotable('TimerBrand');
9
+
9
10
  /** @type {TypedPattern<bigint>} */
10
11
  export const TimestampValueShape = M.nat();
12
+
11
13
  /** @type {TypedPattern<bigint>} */
12
14
  export const RelativeTimeValueShape = M.nat(); // Should we allow negatives?
13
15
 
14
16
  /** @type {TypedPattern<TimestampRecord>} */
15
- export const TimestampRecordShape = harden({
17
+ export const TimestampRecordShape = {
16
18
  timerBrand: TimerBrandShape,
17
19
  absValue: TimestampValueShape,
18
- });
20
+ };
21
+ harden(TimestampRecordShape);
19
22
 
20
23
  /** @type {TypedPattern<RelativeTimeRecord>} */
21
- export const RelativeTimeRecordShape = harden({
24
+ export const RelativeTimeRecordShape = {
22
25
  timerBrand: TimerBrandShape,
23
26
  relValue: RelativeTimeValueShape,
24
- });
27
+ };
28
+ harden(RelativeTimeRecordShape);
25
29
 
26
30
  /** @type {TypedPattern<TimestampRecord | TimestampValue>} */
27
31
  export const TimestampShape = M.or(TimestampRecordShape, TimestampValueShape);
32
+
28
33
  /** @type {TypedPattern<RelativeTimeRecord | RelativeTimeValue>} */
29
34
  export const RelativeTimeShape = M.or(
30
35
  RelativeTimeRecordShape,
@@ -0,0 +1 @@
1
+ export type * from './types.js';
@@ -2,8 +2,6 @@ import type { ERef, RemotableBrand } from '@endo/eventual-send';
2
2
 
3
3
  import type { RankComparison, RemotableObject } from '@endo/marshal';
4
4
 
5
- /// <reference types="@agoric/notifier/src/types.js" />
6
-
7
5
  // These aren't in the global runtime environment. They are just types that are
8
6
  // meant to be globally accessible as a side-effect of importing this module.
9
7
  /**
@@ -107,7 +105,7 @@ export type CancelToken = object;
107
105
  * schedule a single wake() call, create a repeater that will allow scheduling
108
106
  * of events at regular intervals, or remove scheduled calls.
109
107
  */
110
- export interface TimerServiceI {
108
+ export interface TimerServiceCommon {
111
109
  /**
112
110
  * Retrieve the latest timestamp
113
111
  */
@@ -182,9 +180,9 @@ export interface TimerServiceI {
182
180
  getTimerBrand: () => TimerBrand;
183
181
  }
184
182
  // XXX copied from Remotable helper return type
185
- export type TimerService = TimerServiceI &
183
+ export type TimerService = TimerServiceCommon &
186
184
  RemotableObject<'TimerService'> &
187
- RemotableBrand<{}, TimerServiceI>;
185
+ RemotableBrand<{}, TimerServiceCommon>;
188
186
 
189
187
  /**
190
188
  * Read-only access to a TimeService's current time. This allows reading the
File without changes