How do I get a list of class properties?
- Dominant language
- JavaScript
- Stars
- 797
- Forks
- 49
- PR merge metrics
- No merged PRs in 30d
Description
This is a:
- [x] Question
Which concerns:
- [x] flow-runtime
- [x] The documentation website
---
### What is the current behaviour?
When importing `import t from "flow-runtime";` it looks like all the functions under `t` are for describing new types. The documentation also talks about describing types and I need to get the description in runtime.
---
### Which package versions are you using?
`"flow-runtime": "^0.17.0"`
---
### What is the expected behaviour?
I'm searching for a way to examine existing classes.
I've added flow-runtime to my existing project which already uses flow.
I have type annotations on every class property in my project.
For example:
```
export default class SampleClass extends SampleBaseClass {
name: ? string;
value: number;
otherValue: SampleClass2;
}
```
I've added the following to the start of my babel plugins list: `["flow-runtime", {"assert": false, "annotate": true}]`.
All I want, is to get an array of properties names so I can validate a JSON parsed object against it.
Can I achieve this behavior with this library?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.