From 248512565a8c81c4be983ff8caf5ebcf168182f7 Mon Sep 17 00:00:00 2001 From: Hayleigh Thompson Date: Sat, 9 Sep 2023 18:43:47 +0100 Subject: :sparkles: Add a 'BadComponentName' variant to the error type. --- lib/src/lustre.gleam | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/src/lustre.gleam b/lib/src/lustre.gleam index a8bdfd9..209af29 100644 --- a/lib/src/lustre.gleam +++ b/lib/src/lustre.gleam @@ -52,6 +52,7 @@ pub type App(flags, model, msg) pub type Error { AppAlreadyStarted AppNotYetStarted + BadComponentName ComponentAlreadyRegistered ElementNotFound NotABrowser @@ -248,7 +249,7 @@ pub fn start( ) -> Result(fn(msg) -> Nil, Error) @external(javascript, "./lustre.ffi.mjs", "destroy") -pub fn destroy(app: App(flags, model, msg)) -> Nil +pub fn destroy(app: App(flags, model, msg)) -> Result(Nil, Error) // UTILS ----------------------------------------------------------------------- -- cgit v1.2.3