Skip to content

Commit e2c8be7

Browse files
GSMLG-BOTclaude
andcommitted
fix: specify exact init/1 argument pattern in runtime specs
Make init/1 specs more specific to match Dialyzer's success typing: - Changed from generic keyword() to specific pattern [{:component_base, Path.t()} | {:render_timeout, timeout()}, ...] - This matches the actual function head pattern matching Resolves final Dialyzer "invalid_contract" warnings. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent cb2e297 commit e2c8be7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/phoenix/react_server/runtime/bun.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ defmodule Phoenix.ReactServer.Runtime.Bun do
7474
end
7575

7676
@impl true
77-
@spec init(keyword()) ::
77+
@spec init([{:component_base, Path.t()} | {:render_timeout, timeout()}, ...]) ::
7878
{:ok, Phoenix.ReactServer.Runtime.t(), {:continue, :start_port}}
7979
def init(component_base: component_base, render_timeout: render_timeout) do
8080
{:ok,

lib/phoenix/react_server/runtime/deno.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ defmodule Phoenix.ReactServer.Runtime.Deno do
9393
end
9494

9595
@impl true
96-
@spec init(keyword()) ::
96+
@spec init([{:component_base, Path.t()} | {:render_timeout, timeout()}, ...]) ::
9797
{:ok, Phoenix.ReactServer.Runtime.t(), {:continue, :start_port}}
9898
def init(component_base: component_base, render_timeout: render_timeout) do
9999
{:ok,

0 commit comments

Comments
 (0)