-
Notifications
You must be signed in to change notification settings - Fork 11
Description
Is your feature request related to a problem? Please describe.
The @google-cloud/resource-manager package currently requires users to access its interfaces through deeply nested namespaces (e.g., ResourceManager.protos.google.cloud.resourcemanager.v3.IProject). This can be cumbersome and counterintuitive, particularly in TypeScript environments.
The current subpar solution for accessing the TypeScript interfaces looks like this:
import * as ResourceManager from "@google-cloud/resource-manager";
const project: ResourceManager.protos.google.cloud.resourcemanager.v3.IProject = {
name: 'my-project-name',
projectId: 'my-project-id',
};Describe the solution you'd like
I propose that all interfaces within the @google-cloud/resource-manager package (and also other packages if they have the same problem!) be exported as top-level named exports. This change would allow for more straightforward and cleaner import statements, enhancing the developer experience when working with TypeScript.
Benefits:
- Improves code readability and ease of maintenance.
- Simplifies the import process, making it more intuitive for developers.
- Aligns with TypeScript best practices, encouraging more widespread and effective use of the package.
With this change we could easily import TypeScript interfaces like so:
import { Project } from "@google-cloud/resource-manager";
const project: Project = {
name: 'my-project-name',
projectId: 'my-project-id',
};