diff options
author | Hayleigh Thompson <me@hayleigh.dev> | 2024-03-13 07:24:39 +0100 |
---|---|---|
committer | Hayleigh Thompson <me@hayleigh.dev> | 2024-03-13 07:24:39 +0100 |
commit | 8ab89947b1cec1b3705b0566a869c4004e94c60c (patch) | |
tree | 7c12b62e06e8fbdd91a2910f60487d1967a3a945 /src | |
parent | e59b3792c3375d102a1715fd977b58b2521281e7 (diff) | |
download | lustre-8ab89947b1cec1b3705b0566a869c4004e94c60c.tar.gz lustre-8ab89947b1cec1b3705b0566a869c4004e94c60c.zip |
:recycle: Tidy up unused import warnings when using lustre for js target.
Diffstat (limited to 'src')
-rw-r--r-- | src/lustre/internals/runtime.gleam | 8 | ||||
-rw-r--r-- | src/lustre/server_component.gleam | 3 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/lustre/internals/runtime.gleam b/src/lustre/internals/runtime.gleam index a2b5365..95a17a8 100644 --- a/src/lustre/internals/runtime.gleam +++ b/src/lustre/internals/runtime.gleam @@ -52,7 +52,7 @@ pub type DebugAction { // ACTOR ----------------------------------------------------------------------- -@target(erlang) +// @target(erlang) /// /// pub fn start( @@ -87,7 +87,7 @@ pub fn start( actor.start_spec(Spec(init, timeout, loop)) } -@target(erlang) +// @target(erlang) fn loop( message: Action(msg, runtime), state: State(model, msg, runtime), @@ -203,7 +203,7 @@ fn loop( // UTILS ----------------------------------------------------------------------- -@target(erlang) +// @target(erlang) fn run_renderers( renderers: Dict(any, fn(Patch(msg)) -> Nil), patch: Patch(msg), @@ -212,7 +212,7 @@ fn run_renderers( renderer(patch) } -@target(erlang) +// @target(erlang) fn run_effects(effects: Effect(msg), self: Subject(Action(msg, runtime))) -> Nil { let dispatch = fn(msg) { actor.send(self, Dispatch(msg)) } let emit = fn(name, event) { actor.send(self, Emit(name, event)) } diff --git a/src/lustre/server_component.gleam b/src/lustre/server_component.gleam index d478e19..363c662 100644 --- a/src/lustre/server_component.gleam +++ b/src/lustre/server_component.gleam @@ -21,7 +21,10 @@ import lustre/attribute.{type Attribute, attribute} import lustre/effect.{type Effect} import lustre/element.{type Element, element} import lustre/internals/constants +@target(erlang) import lustre/internals/runtime.{type Action, Attrs, Event, SetSelector} +@target(javascript) +import lustre/internals/runtime.{type Action, Attrs, Event} import lustre/internals/patch // ELEMENTS -------------------------------------------------------------------- |