Skip to content

Commit

Permalink
remove TryGetTypedValue member from transpilation
Browse files Browse the repository at this point in the history
  • Loading branch information
HLWeil committed Sep 2, 2024
1 parent 2bef816 commit ab21626
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/DynamicObj/DynamicObj.fs
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,19 @@ type DynamicObj() =
member this.GetValue (name) =
this.TryGetValue(name).Value

#if !FABLE_COMPILER
/// Gets typed property value if type matches, otherwise None.
///
/// WARNING: This Method is not supported in Fable transpiled code. Use static method tryGetTypedValue instead.
member this.TryGetTypedValue<'a> name =
#if !FABLE_COMPILER

match (this.TryGetValue name) with
| None -> None
| Some o ->
match o with
| :? 'a as o -> o |> Some
| _ -> None
#else
failwith "Method TryGetTypedValue is not supported in Fable transpiled code. Use static method tryGetTypedValue instead."
#endif
#endif

member this.TryGetStaticPropertyInfo name : PropertyHelper option =
ReflectionUtils.tryGetStaticPropertyInfo this name
Expand Down

0 comments on commit ab21626

Please sign in to comment.