@agoric/time 0.3.3-u18.0 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agoric/time",
3
- "version": "0.3.3-u18.0",
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-u18.0",
35
- "@endo/errors": "^1.2.7",
36
- "@endo/nat": "^5.0.12",
37
- "@endo/patterns": "^1.4.6"
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.8",
41
- "@endo/init": "^1.1.6",
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": "c22e7250188bbdb07bc021dffdb88af0309a7aa8"
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,
package/src/types.ts CHANGED
@@ -1,4 +1,3 @@
1
- /* eslint-disable no-use-before-define */
2
1
  import type { ERef, RemotableBrand } from '@endo/eventual-send';
3
2
 
4
3
  import type { RankComparison, RemotableObject } from '@endo/marshal';
@@ -106,7 +105,7 @@ export type CancelToken = object;
106
105
  * schedule a single wake() call, create a repeater that will allow scheduling
107
106
  * of events at regular intervals, or remove scheduled calls.
108
107
  */
109
- export interface TimerServiceI {
108
+ export interface TimerServiceCommon {
110
109
  /**
111
110
  * Retrieve the latest timestamp
112
111
  */
@@ -181,9 +180,9 @@ export interface TimerServiceI {
181
180
  getTimerBrand: () => TimerBrand;
182
181
  }
183
182
  // XXX copied from Remotable helper return type
184
- export type TimerService = TimerServiceI &
183
+ export type TimerService = TimerServiceCommon &
185
184
  RemotableObject<'TimerService'> &
186
- RemotableBrand<{}, TimerServiceI>;
185
+ RemotableBrand<{}, TimerServiceCommon>;
187
186
 
188
187
  /**
189
188
  * Read-only access to a TimeService's current time. This allows reading the