hpcc-systems / Visualization

HPCC JavaScript Framework
https://hpcc-systems.github.io/Visualization/
Other
93 stars 62 forks source link

Publish Properties + TS #2349

Closed GordonSmith closed 6 years ago

GordonSmith commented 6 years ago

@jbrundage currently there are about 3 different approaches to publishing properties in typescript. The problem boils down to the following issue: XXX.prototype.publish(...) works fine and augments the class with the property and methods BUT TypeScript does not know anything about the "injected methods" or their signatures.

We should review the current approaches and decide which one is best:

  1. https://github.com/hpcc-systems/Visualization/blob/candidate-2.0.x/packages/common/src/Icon.ts#L131-L139 / https://github.com/hpcc-systems/Visualization/blob/candidate-2.0.x/packages/common/src/Icon.ts#L119-L127
  2. https://github.com/hpcc-systems/Visualization/blob/candidate-2.0.x/packages/marshaller/src/ddl2/activities/filter.ts#L11-L18
  3. https://github.com/GordonSmith/Visualization/blob/TMP2/packages/chart/src/Scatter.ts#L243-L270
jbrundage commented 6 years ago

I have this locally passing lint... currently working on getting it to build

GordonSmith commented 6 years ago

Expired - please reopen if needed.