diff options
author | Hayleigh Thompson <me@hayleigh.dev> | 2023-08-22 23:33:45 +0100 |
---|---|---|
committer | Hayleigh Thompson <me@hayleigh.dev> | 2023-08-22 23:33:45 +0100 |
commit | 9bc9b6ae2664b63b02a8cb5a44660f7f225ad910 (patch) | |
tree | 086ac524707fb0798ff78b6b887d6fe8367be1f3 /lib/src/lustre.gleam | |
parent | 3f5114d3ad44347763e5b53e69b31c38e38f9a97 (diff) | |
download | lustre-9bc9b6ae2664b63b02a8cb5a44660f7f225ad910.tar.gz lustre-9bc9b6ae2664b63b02a8cb5a44660f7f225ad910.zip |
:sparkles: Make it possible to manually destroy a running lustre app.
Diffstat (limited to 'lib/src/lustre.gleam')
-rw-r--r-- | lib/src/lustre.gleam | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/src/lustre.gleam b/lib/src/lustre.gleam index 2585a5b..a8bdfd9 100644 --- a/lib/src/lustre.gleam +++ b/lib/src/lustre.gleam @@ -247,6 +247,9 @@ pub fn start( flags: flags, ) -> Result(fn(msg) -> Nil, Error) +@external(javascript, "./lustre.ffi.mjs", "destroy") +pub fn destroy(app: App(flags, model, msg)) -> Nil + // UTILS ----------------------------------------------------------------------- @external(javascript, "./lustre.ffi.mjs", "is_browser") |