diff options
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | src/gleam/dynamic.gleam | 15 |
2 files changed, 2 insertions, 14 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 0106440..7f471df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Unreleased - The `function.curry*` functions have been deprecated. +- The deprecated `dynamic.unsafe_coerce` function has been removed. ## v0.39.0 - 2024-07-09 diff --git a/src/gleam/dynamic.gleam b/src/gleam/dynamic.gleam index 731d3e2..bac548a 100644 --- a/src/gleam/dynamic.gleam +++ b/src/gleam/dynamic.gleam @@ -26,22 +26,9 @@ pub type Decoder(t) = /// Converts any Gleam data into `Dynamic` data. /// -pub fn from(a) -> Dynamic { - do_from(a) -} - -@external(erlang, "gleam_stdlib", "identity") -@external(javascript, "../gleam_stdlib.mjs", "identity") -fn do_from(a: anything) -> Dynamic - -@deprecated("This function undermines the type system and opens the door to cryptic runtime errors and incorrect behaviour") -pub fn unsafe_coerce(a: Dynamic) -> anything { - do_unsafe_coerce(a) -} - @external(erlang, "gleam_stdlib", "identity") @external(javascript, "../gleam_stdlib.mjs", "identity") -fn do_unsafe_coerce(a: Dynamic) -> a +pub fn from(a: anything) -> Dynamic /// Decodes a `Dynamic` value from a `Dynamic` value. /// |