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

Update TS codegen - change getFullyQualifiedName return type from string to string literal #8421

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

rametta
Copy link

@rametta rametta commented Oct 8, 2024

Makes the return type of static getFullyQualifiedName(): string be a string literal instead of just the string type. This helps make the return type be more specific instead of just a generic string - which helps with other tools that run static analysis on the generated code types.

Changes:

// before
static getFullyQualifiedName(): string {
  return "Some.Name";
}

// after
static getFullyQualifiedName(): "Some.Name" {
  return "Some.Name";
}

Copy link

google-cla bot commented Oct 8, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@github-actions github-actions bot added c++ codegen Involving generating code from schema javascript typescript labels Oct 8, 2024
Makes the return type of `static getFullyQualifiedName()` be a string literal instead of just the string type

Update tests
@rametta
Copy link
Author

rametta commented Oct 8, 2024

Just signed the CLA, thanks!

@rametta
Copy link
Author

rametta commented Oct 25, 2024

@bjornharrtell sorry to tag you but I saw you on some other TS related PR's and thought you might be able to review this one too. Would be much appreciated

Copy link
Collaborator

@bjornharrtell bjornharrtell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@rametta
Copy link
Author

rametta commented Oct 30, 2024

Any chance we could merge this one? Or do we need another approval first?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ codegen Involving generating code from schema javascript typescript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants