From 1b591df09d48aaee29e4a7d2568ab1abf40abaf1 Mon Sep 17 00:00:00 2001 From: Alexandre Lagane Date: Mon, 3 May 2021 13:33:23 +0200 Subject: [PATCH] fixup! Rename IMethodCall to IInvocation and refactor --- src/types.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/types.ts b/src/types.ts index f5dc25e..ca20d83 100644 --- a/src/types.ts +++ b/src/types.ts @@ -12,13 +12,16 @@ export type IMethodName = export type IErrorName = 'error'; +export type IInvocationName = IMethodName | IErrorName; + /** * See https://jmap.io/spec-core.html#the-invocation-data-type - * [ name, arguments, methodCallId ] */ -export type IInvocation = - | [IMethodName, ArgumentsType, string] - | [IErrorName, IError, string]; +export type IInvocation = [ + name: IInvocationName, + arguments: ArgumentsType, + methodCallId: string, +]; export type IEntityProperties = IMailboxProperties | IEmailProperties | IEmailSubmissionProperties;