-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Fix Identifier type #16685
Conversation
index.test.ts
Outdated
|
||
describe('Using BCD', () => { | ||
it('subscript notation', () => { | ||
const data: CompatStatement = bcd['api']['AbortController']['__compat']; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
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!
Interestingly this does not make anything fail?
* 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>
This PR fixes the
Identifier
type to ensure the BCD data can be converted to the TypeScript types.