Skip to content

Commit ab21626

Browse files
committed
remove TryGetTypedValue member from transpilation
1 parent 2bef816 commit ab21626

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/DynamicObj/DynamicObj.fs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,19 @@ type DynamicObj() =
2727
member this.GetValue (name) =
2828
this.TryGetValue(name).Value
2929

30+
#if !FABLE_COMPILER
3031
/// Gets typed property value if type matches, otherwise None.
3132
///
3233
/// WARNING: This Method is not supported in Fable transpiled code. Use static method tryGetTypedValue instead.
3334
member this.TryGetTypedValue<'a> name =
34-
#if !FABLE_COMPILER
35+
3536
match (this.TryGetValue name) with
3637
| None -> None
3738
| Some o ->
3839
match o with
3940
| :? 'a as o -> o |> Some
4041
| _ -> None
41-
#else
42-
failwith "Method TryGetTypedValue is not supported in Fable transpiled code. Use static method tryGetTypedValue instead."
43-
#endif
42+
#endif
4443

4544
member this.TryGetStaticPropertyInfo name : PropertyHelper option =
4645
ReflectionUtils.tryGetStaticPropertyInfo this name

0 commit comments

Comments
 (0)