Skip to content

[#603][6.1] Improve Operator Metadata Type Definition and Constants - #619

Merged
zuozhiw merged 2 commits into
masterfrom
new-gui-metadata
Jun 20, 2018
Merged

zuozhiw merged 2 commits into
masterfrom
new-gui-metadata

Conversation

@zuozhiw

@zuozhiw zuozhiw commented Jun 3, 2018 •

Copy link
Copy Markdown
Contributor

This PR:

  1. improves the Operator Metadata Type Definition. Previously the type of jsonSchema is object, now we introduced the @types/json-schema dependency and its type is changed to JsonSchema4, which represents Json Schema Draft 4.
  2. changes the operator metadata constants. Originally the constants are declared as {'key':'value'}, however, declaring the key as a string is not best practice and it should just be declared as a normal object in {key: 'value'} format.
  3. change the constant function back to constant variable. Previously in PR [#603][3.3] Add various improvements to the existing new gui code #613, all the constants are changed to be a function that returns a deep copy of the constant to avoid callers modifying the object reference. However, with changes introduced in [#603][3.4] Make interface Immutable and move interface files to .interface.ts #617, all the interfaces are declared as Readonly, which makes the object immutable. Therefore the change is not necessary. This PR reverts those changes.

@zuozhiw
zuozhiw changed the base branch from master to new-gui-dnd June 3, 2018 06:15
@henrychen0220
henrychen0220 self-requested a review June 4, 2018 00:38
@zuozhiw
zuozhiw changed the base branch from new-gui-dnd to master June 20, 2018 03:04
@zuozhiw
zuozhiw merged commit 7e5c096 into master Jun 20, 2018
@zuozhiw
zuozhiw deleted the new-gui-metadata branch June 24, 2018 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants