-
Notifications
You must be signed in to change notification settings - Fork 81
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
Split client side code up into multiple modules #467
Comments
Sigh. Typescript isn't quite ready for packaging separate modules the way I want it to be. Although some of it might just be Javascript, I'm not sure which. So it appears to be impossible to export classes intended to be subclassed from one library to another, at least with es6 For example:
The only google hit for that "but cannot be named" error is the source code for the typescript compiler itself. And all I'm doing there is instantiating a class (a generic class, yes, but it's fully described as generic in the |
Apparently the problem is with aliasing - the core packages are bundled up with this:
Apparent that turns the exported If I put this import in
But that's really clumsy, and the aliasing issue means we can't centralize imports to isolate the reference paths (which it looks like should go away with |
|
Just found a new HTTP client lib with browser+node support that looks like it may be an improvement over superagent (my current go-to lib): https://github.com/mzabriskie/axios |
One of the things we'd like to do is script the creation and maintenance of dashboards from other automated internal tooling. To do that, we need to extract a clean API client library, so the front-end code needs to be split into modules.
Likely modules:
tessera-core
- stuff fromsrc/ts/core
: registry, log, event-source. NOT properties or actions, as those are UI-specific.tessera-model
- core model classes, stripped of their rendering codetessera-client
- HTTP API client for interacting with the serverThis will end up complicating the process of adding new dashboard items a bit, as we'll need to separate the model object from the rendering code, but (a) that's a good separation to have, and (b) adding new dashboard items isn't that frequent a task; we've got quite an extensive roster of them already.
The text was updated successfully, but these errors were encountered: