@@ -80,7 +80,7 @@ export interface AuthorizationError extends Error {
8080export type Call <
8181 Ability extends The = The ,
8282 Of extends DID = DID ,
83- Args extends { } = { } ,
83+ Args extends NonNullable < unknown > = NonNullable < unknown > ,
8484> = {
8585 cmd : Ability ;
8686 sub : Of ;
@@ -91,7 +91,7 @@ export type Call<
9191export type Command <
9292 Ability extends The = The ,
9393 Of extends DID = DID ,
94- In extends { } = { } ,
94+ In extends NonNullable < unknown > = NonNullable < unknown > ,
9595> = {
9696 cmd : Ability ;
9797 sub : Of ;
@@ -103,7 +103,7 @@ export type Command<
103103export type Invocation <
104104 Ability extends The = The ,
105105 Of extends DID = DID ,
106- In extends { } = { } ,
106+ In extends NonNullable < unknown > = NonNullable < unknown > ,
107107> = {
108108 iss : DID ;
109109 aud ?: DID ;
@@ -161,7 +161,7 @@ export type Protocol<Space extends MemorySpace = MemorySpace> = {
161161
162162export type Proto = {
163163 [ Subject : DID ] : {
164- [ Namespace : string ] : { } ;
164+ [ Namespace : string ] : NonNullable < unknown > ;
165165 } ;
166166} ;
167167
@@ -175,8 +175,8 @@ export type InferProtoMethods<
175175 Prefix extends string = "" ,
176176> = {
177177 [ Name in keyof Methods & string ] : Methods [ Name ] extends (
178- input : infer In extends { } ,
179- ) => Task < infer Out extends { } , infer Effect > ?
178+ input : infer In extends NonNullable < unknown > ,
179+ ) => Task < infer Out extends NonNullable < unknown > , infer Effect > ?
180180 | {
181181 [ The in `${Prefix } /${Name } `] : Method <
182182 Protocol ,
@@ -195,8 +195,8 @@ export type InferProtoMethods<
195195export type Method <
196196 Protocol ,
197197 Ability extends The ,
198- In extends { } ,
199- Out extends { } ,
198+ In extends NonNullable < unknown > ,
199+ Out extends NonNullable < unknown > ,
200200 Effect ,
201201> = {
202202 The : Ability ;
@@ -243,7 +243,7 @@ type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends
243243 ( k : infer I ) => void ? I
244244 : never ;
245245
246- export type Provider < Protocol extends { } > = {
246+ export type Provider < Protocol extends NonNullable < unknown > > = {
247247 perform ( command : ProviderCommand < Protocol > ) : AwaitResult < Unit , SystemError > ;
248248} ;
249249
@@ -341,7 +341,7 @@ export type ConsumerResultFor<Ability, Protocol extends Proto> = MethodFor<
341341
342342export interface InvocationView <
343343 Source extends Invocation ,
344- Return extends { } ,
344+ Return extends NonNullable < unknown > ,
345345 Effect ,
346346> extends Invocation < Source [ "cmd" ] , Source [ "sub" ] , Source [ "args" ] > {
347347 return ( result : Await < Return > ) : void ;
@@ -353,8 +353,8 @@ export interface InvocationView<
353353export type Task < Return , Command = never > = Iterable < Command , Return > ;
354354
355355export type Job <
356- Command extends { } = { } ,
357- Return extends { } | null = { } | null ,
356+ Command extends NonNullable < unknown > = NonNullable < unknown > ,
357+ Return extends NonNullable < unknown > | null = NonNullable < unknown > | null ,
358358 Effect = unknown ,
359359> = {
360360 invoke : Command ;
@@ -378,7 +378,7 @@ export type SessionTask<Space extends MemorySpace> =
378378 | UnwatchTask < Space >
379379 | WatchTask < Space > ;
380380
381- export type Receipt < Command extends { } , Result extends { } | null , Effect > =
381+ export type Receipt < Command extends NonNullable < unknown > , Result extends NonNullable < unknown > | null , Effect > =
382382 | {
383383 the : "task/return" ;
384384 of : InvocationURL < Reference < Command > > ;
@@ -391,13 +391,13 @@ export type Receipt<Command extends {}, Result extends {} | null, Effect> =
391391 is : Effect ;
392392 } ) ;
393393
394- export type Effect < Of extends { } , Command > = {
394+ export type Effect < Of extends NonNullable < unknown > , Command > = {
395395 of : Reference < Of > ;
396396 run : Command ;
397397 is ?: undefined ;
398398} ;
399399
400- export type Return < Of extends { } , Result extends { } | null > = {
400+ export type Return < Of extends NonNullable < unknown > , Result extends NonNullable < unknown > | null > = {
401401 of : Reference < Of > ;
402402 is : Result ;
403403 run ?: undefined ;
@@ -730,7 +730,7 @@ export type Selection<Space extends MemorySpace = MemorySpace> = {
730730 [ space in Space ] : FactSelection ;
731731} ;
732732
733- export type Unit = { } ;
733+ export type Unit = NonNullable < unknown > ;
734734
735735/**
736736 * Generic type used to annotate underlying type with a context of the replica.
0 commit comments