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

Fix Identifier type #16685

Merged
merged 3 commits into from
Jun 15, 2022
Merged

Fix Identifier type #16685

merged 3 commits into from
Jun 15, 2022

Conversation

queengooborg
Copy link
Contributor

This PR fixes the Identifier type to ensure the BCD data can be converted to the TypeScript types.

@github-actions github-actions bot added dependencies Pull requests that update a dependency package or file. infra Infrastructure issues (npm, GitHub Actions, releases) of this project schema Isses or pull requests regarding the JSON schema files used in this project. labels Jun 15, 2022
index.test.ts Outdated

describe('Using BCD', () => {
it('subscript notation', () => {
const data: CompatStatement = bcd['api']['AbortController']['__compat'];
Copy link
Contributor

Choose a reason for hiding this comment

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

warning 'data' is assigned a value but never used

The easiest way to fix this is not to declare the variable:

  it('subscript notation', () => {
    bcd['api']['AbortController']['__compat'];
  });

Similarly on line 14.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The purpose of the variable was to ensure that the types match. I've added an assert.ok() call so this check can still be utilized!

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, I see, yes that makes more sense!

@queengooborg queengooborg merged commit 9c8b938 into mdn:main Jun 15, 2022
@queengooborg queengooborg deleted the typescript/types branch June 15, 2022 19:18
saschanaz added a commit to saschanaz/browser-compat-data that referenced this pull request Jun 16, 2022
Interestingly this does not make anything fail?
queengooborg added a commit that referenced this pull request Jun 17, 2022
* Verify types.d.ts after generation

* Revert the schema change from #16685

Interestingly this does not make anything fail?

Co-authored-by: Queen Vinyl Da.i'gyu-Kazotetsu <vinyldarkscratch@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency package or file. infra Infrastructure issues (npm, GitHub Actions, releases) of this project schema Isses or pull requests regarding the JSON schema files used in this project.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants