@agoric/time 0.3.3-u18.0 → 0.3.3-u19.0
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 +9 -9
- package/src/typeGuards.js +9 -4
- package/src/types.ts +3 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/time",
|
|
3
|
-
"version": "0.3.3-
|
|
3
|
+
"version": "0.3.3-u19.0",
|
|
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-
|
|
35
|
-
"@endo/errors": "^1.2.
|
|
36
|
-
"@endo/nat": "^5.0.
|
|
37
|
-
"@endo/patterns": "^1.4.
|
|
34
|
+
"@agoric/store": "^0.9.3-u19.0",
|
|
35
|
+
"@endo/errors": "^1.2.9",
|
|
36
|
+
"@endo/nat": "^5.0.14",
|
|
37
|
+
"@endo/patterns": "^1.4.8"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@endo/far": "^1.1.
|
|
41
|
-
"@endo/init": "^1.1.
|
|
40
|
+
"@endo/far": "^1.1.10",
|
|
41
|
+
"@endo/init": "^1.1.8",
|
|
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.
|
|
61
|
+
"atLeast": 88.75
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "29e9704c375a06bb617027093b30d2d25faa6471"
|
|
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 =
|
|
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 =
|
|
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
|
|
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 =
|
|
183
|
+
export type TimerService = TimerServiceCommon &
|
|
185
184
|
RemotableObject<'TimerService'> &
|
|
186
|
-
RemotableBrand<
|
|
185
|
+
RemotableBrand<object, TimerServiceCommon>;
|
|
187
186
|
|
|
188
187
|
/**
|
|
189
188
|
* Read-only access to a TimeService's current time. This allows reading the
|