-
Notifications
You must be signed in to change notification settings - Fork 149
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
chore!: upgrade typescript to v4.1.5 #1592
Conversation
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.
I wonder if this needs to be chore!
just to play it safe. This would trigger a major version bump.
dev/system-test/firestore.ts
Outdated
@@ -444,7 +444,8 @@ describe('DocumentReference class', () => { | |||
}); | |||
|
|||
it('has set() method', () => { | |||
const allSupportedTypesObject = { | |||
/* eslint-disable @typescript-eslint/no-explicit-any */ | |||
const allSupportedTypesObject: {[field: string]: any} = { |
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.
This can probably be unknown
.
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.
We need any
since we access allSupportedTypesObject.pathValue.path
on L478.
dev/test/index.ts
Outdated
@@ -262,7 +262,8 @@ const allSupportedTypesInput = { | |||
bytesValue: Buffer.from([0x1, 0x2]), | |||
}; | |||
|
|||
const allSupportedTypesOutput = { | |||
/* eslint-disable @typescript-eslint/no-explicit-any */ | |||
const allSupportedTypesOutput: {[field: string]: any} = { |
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.
This can probably be unknown
.
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.
We need any
here since we access pathValue.formattedName
on L680, which would would error since pathValue
has unknown
type.
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.
You can cast there if it happens just one. unknown as X
is more type safe than any
.
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.
Good point, done for both.
dev/test/index.ts
Outdated
@@ -676,7 +676,8 @@ describe('snapshot_() method', () => { | |||
// Deep Equal doesn't support matching instances of DocumentRefs, so we | |||
// compare them manually and remove them from the resulting object. | |||
expect(actualObject.get('pathValue').formattedName).to.equal( | |||
expected.pathValue.formattedName | |||
/* eslint-disable @typescript-eslint/no-explicit-any */ | |||
(expected.pathValue as any).formattedName |
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.
as DocumentReference
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.
Sorry for being hasty 😨
dev/system-test/firestore.ts
Outdated
@@ -474,7 +474,8 @@ describe('DocumentReference class', () => { | |||
.then(doc => { | |||
const data = doc.data()!; | |||
expect(data.pathValue.path).to.equal( | |||
allSupportedTypesObject.pathValue.path | |||
/* eslint-disable @typescript-eslint/no-explicit-any */ | |||
(allSupportedTypesObject.pathValue as any).path |
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.
as IDontKnowWhatTypeThisIsButWeCanFindOut
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.
LGTM.
Let's not merge this until the follow-up PR is ready and we know how to make patch releases for prior versions.
Yep, I'm merging this into a 4.1 feature branch that I'll add the other changes to. |
No description provided.