diff options
author | Hayleigh Thompson <me@hayleigh.dev> | 2023-09-09 18:43:47 +0100 |
---|---|---|
committer | Hayleigh Thompson <me@hayleigh.dev> | 2023-09-09 18:43:47 +0100 |
commit | 248512565a8c81c4be983ff8caf5ebcf168182f7 (patch) | |
tree | dda3fc003af7abfce7d19f6ec94188e48517472f | |
parent | 36b4cbf432bdccbc0d3c16692d913e4d1e263dfa (diff) | |
download | lustre-248512565a8c81c4be983ff8caf5ebcf168182f7.tar.gz lustre-248512565a8c81c4be983ff8caf5ebcf168182f7.zip |
:sparkles: Add a 'BadComponentName' variant to the error type.
-rw-r--r-- | lib/src/lustre.gleam | 3 |
1 files changed, 2 insertions, 1 deletions
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 ----------------------------------------------------------------------- |