-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Several times we've run into situations where our constructed name for a type (e.g., PascalCase(method name) + "Params") conflicts with an actual named type in the API. We have worked around this by renaming things in the API and that continues to be a fine strategy, but we could completely eliminate this problem by putting the real structs from Nexus in one namespace and our made-up ones in another.
TypeScript has explicit namespace concept, but it's considered a bit old-school. The more idiomatic way of namespacing things is putting them in their own module and importing that module. However, this has the downside of turning our very convenient single-file generated client into multiple files. And it seems namespaces are not going away. So the simplest thing is probably to use namespace.