-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: revised generating typescript interfaces section #4504
Conversation
### Generating interfaces and types for use in MOLGENIS fontend apps | ||
|
||
To generate the typescript interfaces for a given schema, run: | ||
`./gradlew generateTypes --args=[schemaName] [full-path+file-name]` | ||
Throughout the EMX2 frontend, we use typescript for stronger typing and validation in our frontend components. To make things easier for developers, we've include a command for autogenerating typescript interfaces and types from an EMX2 schema. This process is outlined in the steps below. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
somewhat verbose, prefer more direct style of current doc
```terminal | ||
./gradlew run | ||
``` | ||
|
||
#### 2. Import your schema | ||
|
||
Once your instance is live - | ||
|
||
1. Navigate to the local emx2 instance at [http://localhost:8080/](http://localhost:8080/) | ||
2. Sign in as admin or as another user that can create databases | ||
3. Create a new database (e.g., `My new database`) | ||
4. Import your EMX2 file into the new database | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do not have to use this run command of create an new database to generate the types
|
||
#### 3. Generate the interfaces and types | ||
|
||
In your application folder (`apps/*`), create a directory to store the types (e.g., "types", "interfaces", etc.). The command is `generateTypes`. The syntax to generate the file is described below. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does not have to be in the apps folder
What are the main changes you did
How to test
Checklist