This project used to namespace operations by service which was very nice:
FooService.myOperation(foo)
However, the default is now to have everything at the top-level without a per-service namespace. The new generation use top level consts, which allow for tree-shaking, especially useful for large apis and bundler. Windmill has an extremely large API https://github.com/windmill-labs/windmill and use this for its typescript-client.
It seems to me that keeping the old namespaced methods and tree-shaking are compatible, it would just require writing top-level objects. The reason tree-shaking doesn't work with the old generation is that it's class + method based, not that it's namespaced. An example of a generation that would be compatible with tree-shaking:
Description
This project used to namespace operations by service which was very nice:
However, the default is now to have everything at the top-level without a per-service namespace. The new generation use top level consts, which allow for tree-shaking, especially useful for large apis and bundler. Windmill has an extremely large API https://github.com/windmill-labs/windmill and use this for its typescript-client.
It seems to me that keeping the old namespaced methods and tree-shaking are compatible, it would just require writing top-level objects. The reason tree-shaking doesn't work with the old generation is that it's class + method based, not that it's namespaced. An example of a generation that would be compatible with tree-shaking:
We are happy to contribute to the codebase and add that as a feature, we just wanted to discuss the feature first and if there were any objections.