You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now bundles are required to have src/index.ts as their main "exported" entry point, while Typescript code that consumes that bundle usually imports from src/functions (or anywhere that doesn't import context).
Moving forward, bundles will as their main export end up exporting a ModulePlugin. But this poses several issues:
Documentation is difficult, since all docstrings would have to be defined on the methods defined in the module plugin itself for it to be detected by Typedoc.
Following from the above, if Typescript consumers want to import functions from another bundle, the docstrings aren't available (or have to be duplicated).
Also, Typescript consumers probably shouldn't have to import the ModulePlugin just to use the code from another bundle.
Previously, the functions.ts file was assumed to be the documentation entry point for bundles. This hasn't been necessary for a long time since the bundles were restructured to behave like regular ES Modules, so Typedoc can get all its information from index.ts. Perhaps it is time to revisit such a solution.
Then plugin.ts and functions.ts effectively serve as two different entrypoints for two different purposes (to be loaded by Conductor and to be processed as regular Typescript). This structure might even be language agonstic if we start writing modules in other languages.
We can set our own conventions in package.json using the exports field: custom export conditions have been around for some time, though that is Javascript specific.
There will likely be a necessity to expand buildtools to work with this structure.
Right now bundles are required to have
src/index.tsas their main "exported" entry point, while Typescript code that consumes that bundle usually imports fromsrc/functions(or anywhere that doesn't import context).Moving forward, bundles will as their main export end up exporting a
ModulePlugin. But this poses several issues:ModulePluginjust to use the code from another bundle.Previously, the
functions.tsfile was assumed to be the documentation entry point for bundles. This hasn't been necessary for a long time since the bundles were restructured to behave like regular ES Modules, so Typedoc can get all its information fromindex.ts. Perhaps it is time to revisit such a solution.A potential structure could be like this:
Then
plugin.tsandfunctions.tseffectively serve as two different entrypoints for two different purposes (to be loaded by Conductor and to be processed as regular Typescript). This structure might even be language agonstic if we start writing modules in other languages.We can set our own conventions in
package.jsonusing theexportsfield: custom export conditions have been around for some time, though that is Javascript specific.There will likely be a necessity to expand buildtools to work with this structure.
Related Issues: