From 9f8fd47c98cc993c4febfd7a6da33a431360cb39 Mon Sep 17 00:00:00 2001 From: Tyler Barker Date: Thu, 4 Jul 2024 21:45:50 +1000 Subject: [PATCH 1/4] add type declaration files --- assets/js/live_toast/index.d.ts | 5 +++++ assets/js/live_toast/live_toast.d.ts | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 assets/js/live_toast/index.d.ts create mode 100644 assets/js/live_toast/live_toast.d.ts diff --git a/assets/js/live_toast/index.d.ts b/assets/js/live_toast/index.d.ts new file mode 100644 index 0000000..bf00b90 --- /dev/null +++ b/assets/js/live_toast/index.d.ts @@ -0,0 +1,5 @@ +import { ViewHook } from "../../../deps/phoenix_live_view"; + +declare const createLiveToastHook: () => ViewHook; + +export { createLiveToastHook }; diff --git a/assets/js/live_toast/live_toast.d.ts b/assets/js/live_toast/live_toast.d.ts new file mode 100644 index 0000000..bf00b90 --- /dev/null +++ b/assets/js/live_toast/live_toast.d.ts @@ -0,0 +1,5 @@ +import { ViewHook } from "../../../deps/phoenix_live_view"; + +declare const createLiveToastHook: () => ViewHook; + +export { createLiveToastHook }; From c71347a5378c2ca1a97d4c2323fea6900509fad6 Mon Sep 17 00:00:00 2001 From: Curtis Ault Date: Thu, 4 Jul 2024 11:33:54 -0500 Subject: [PATCH 2/4] LiveView v0.20 Required for `stream_configure` --- mix.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mix.exs b/mix.exs index a6fe01c..f51f881 100644 --- a/mix.exs +++ b/mix.exs @@ -33,7 +33,7 @@ defmodule LiveToast.MixProject do defp deps do [ {:phoenix, ">= 1.7.0"}, - {:phoenix_live_view, ">= 0.18.0"}, + {:phoenix_live_view, ">= 0.20.0"}, {:ecto, ">= 3.11.0"}, {:esbuild, "~> 0.2", only: :dev}, {:bandit, "~> 1.1", only: :dev}, From 8b83a95f445e956b44531e79b82ab523a19dd01e Mon Sep 17 00:00:00 2001 From: Andrew Stewart Date: Sat, 6 Jul 2024 07:42:37 -0400 Subject: [PATCH 3/4] Delete assets/js/live_toast/live_toast.d.ts --- assets/js/live_toast/live_toast.d.ts | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 assets/js/live_toast/live_toast.d.ts diff --git a/assets/js/live_toast/live_toast.d.ts b/assets/js/live_toast/live_toast.d.ts deleted file mode 100644 index bf00b90..0000000 --- a/assets/js/live_toast/live_toast.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { ViewHook } from "../../../deps/phoenix_live_view"; - -declare const createLiveToastHook: () => ViewHook; - -export { createLiveToastHook }; From 9fa73a2f4c9e7b667ab5b148527d5510552e66e0 Mon Sep 17 00:00:00 2001 From: Andrew Date: Sat, 6 Jul 2024 07:45:50 -0400 Subject: [PATCH 4/4] move types to top level --- assets/index.d.ts | 5 +++++ assets/js/live_toast/index.d.ts | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) create mode 100644 assets/index.d.ts delete mode 100644 assets/js/live_toast/index.d.ts diff --git a/assets/index.d.ts b/assets/index.d.ts new file mode 100644 index 0000000..8c2631d --- /dev/null +++ b/assets/index.d.ts @@ -0,0 +1,5 @@ +import { ViewHook } from "../deps/phoenix_live_view" + +declare const createLiveToastHook: () => ViewHook + +export { createLiveToastHook } diff --git a/assets/js/live_toast/index.d.ts b/assets/js/live_toast/index.d.ts deleted file mode 100644 index bf00b90..0000000 --- a/assets/js/live_toast/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { ViewHook } from "../../../deps/phoenix_live_view"; - -declare const createLiveToastHook: () => ViewHook; - -export { createLiveToastHook };