Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
HLWeil committed Aug 20, 2024
1 parent 71078db commit b676a17
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 18 deletions.
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
name = "DynamicObj"
version = "3.0.0"
description = "Fable compatible library supporting Dynamic Objects including inheritance in functional style."
authors = ["Heinrich Lukas Weil <[email protected]>", "Kevin Frey <[email protected]>"]
maintainers = ["Florian Wetzels"]
authors = [""]
maintainers = [""]
readme = "README.md"
repository = "https://github.com/nfdi4plants/ARCtrl"
keywords = ["arc", "annotated research context", "isa", "research data", "multi platform"]
repository = ""
keywords = [""]

[tool.poetry.dependencies]
python = "^3.10"
Expand Down
14 changes: 1 addition & 13 deletions src/DynamicObj/DynamicObj.fs
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,9 @@
open System.Collections.Generic
open Fable.Core

module Fable =

[<Emit("$0[$1]")>]
let getProperty (o:obj) (propName:string) : 'a =
jsNative

[<Emit("Object.getOwnPropertyNames($0)")>]
let getPropertyNames (o:obj) : string seq =
jsNative

[<AttachMembers>]
type DynamicObj() =



let mutable properties = new Dictionary<string, obj>()

member this.Properties
Expand Down Expand Up @@ -77,7 +65,7 @@ type DynamicObj() =
#endif

member this.Remove name =
match ReflectionUtils.removeStaticProperty this name with
match ReflectionUtils.removeProperty this name with
| true -> true
// Maybe in map
| false -> properties.Remove(name)
Expand Down
2 changes: 1 addition & 1 deletion src/DynamicObj/ReflectionUtils.fs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ module ReflectionUtils =
| :? System.Reflection.TargetInvocationException -> None
| :? System.NullReferenceException -> None

let removeStaticProperty (o:obj) (propName:string) =
let removeProperty (o:obj) (propName:string) =

match tryGetPropertyInfo o propName with
| Some property when property.IsMutable ->
Expand Down

0 comments on commit b676a17

Please sign in to comment.