From 9026c578f637fffee792b4397251f0ca4562caa5 Mon Sep 17 00:00:00 2001 From: bptato Date: Mon, 28 Aug 2023 22:44:26 +0200 Subject: refactor: Result[T, JSError] -> JSResult[T] --- src/html/event.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/html') diff --git a/src/html/event.nim b/src/html/event.nim index dd946820..0584b230 100644 --- a/src/html/event.nim +++ b/src/html/event.nim @@ -84,7 +84,7 @@ proc innerEventCreationSteps(event: Event, ctx: JSContext, #TODO eventInitDict type proc newEvent(ctx: JSContext, ctype: string, eventInitDict = JS_UNDEFINED): - Result[Event, JSError] {.jsctor.} = + JSResult[Event] {.jsctor.} = if not JS_IsUndefined(eventInitDict) and not JS_IsObject(eventInitDict): return err(newTypeError("eventInitDict must be an object")) let event = Event() @@ -149,7 +149,7 @@ func composed(this: Event): bool {.jsfget.} = # CustomEvent proc newCustomEvent(ctx: JSContext, ctype: string, - eventInitDict = JS_UNDEFINED): Result[CustomEvent, JSError] {.jsctor.} = + eventInitDict = JS_UNDEFINED): JSResult[CustomEvent] {.jsctor.} = if not JS_IsUndefined(eventInitDict) and not JS_IsObject(eventInitDict): return err(newTypeError("eventInitDict must be an object")) let event = CustomEvent() -- cgit 1.4.1-2-gfad0