Skip to content
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

[NodeJS] Split types/input.d.ts and types/output.d.ts in several dedicated files per namespace #6571

Closed
boillodmanuel opened this issue Mar 18, 2021 · 4 comments
Assignees
Labels
area/codegen SDK-gen, program-gen, convert kind/enhancement Improvements or new features language/javascript resolution/duplicate This issue is a duplicate of another issue
Milestone

Comments

@boillodmanuel
Copy link

Affected feature

At least in nodejs version, types/input.d.ts and types/ouput.d.ts are a big file with a typescript namespace per azure namespace.
This is not the case with enums.

So currently we could import inputs and enums like this:

import { authorization as authorizationTypes } from '@pulumi/azure-native/types/input'
import * as authorizationEnums from '@pulumi/azure-native/types/enums/authorization'

It would be great to be able to import only selected namespace like for enums:

import * as authorizationTypes  from '@pulumi/azure-native/types/input/authorization'
import * as authorizationEnums from '@pulumi/azure-native/types/enums/authorization'

// and we can be more specific by including a single type
import { AccessReviewInstance }  from '@pulumi/azure-native/types/input/authorization'

It's more consistent, and may improve performance.

[Side question] I wonder why all versions are present in enums but not in input?

@mikhailshilkov mikhailshilkov transferred this issue from pulumi/pulumi-azure-native Mar 18, 2021
@mikhailshilkov
Copy link
Member

Moved to pulumi/pulumi which owns the codegen for this

@mikhailshilkov
Copy link
Member

I wonder why all versions are present in enums but not in input?

Can you give an example of what's missing in input? All versions should be there.

@mikhailshilkov mikhailshilkov added area/codegen SDK-gen, program-gen, convert kind/enhancement Improvements or new features language/javascript labels Mar 18, 2021
@boillodmanuel
Copy link
Author

Can you give an example of what's missing in input? All versions should be there.

You're right! I haven't seen nested namespaces ;)
Thanks

@RobbieMcKinstry RobbieMcKinstry added the resolution/duplicate This issue is a duplicate of another issue label Mar 31, 2023
@RobbieMcKinstry RobbieMcKinstry self-assigned this Mar 31, 2023
@RobbieMcKinstry RobbieMcKinstry added this to the 0.86 milestone Mar 31, 2023
@RobbieMcKinstry
Copy link
Contributor

I believe this issue is a duplicate of #8613
The good news is I've made some progress in that dimension. The bad news was we had to back out my initial PR, and revisit it with a new design.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/codegen SDK-gen, program-gen, convert kind/enhancement Improvements or new features language/javascript resolution/duplicate This issue is a duplicate of another issue
Projects
None yet
Development

No branches or pull requests

3 participants