Typescript config parity with Browsertrix repo (#289)
Follow-up from #288 This matches the strictness rules with the Browsertrix repo, specifically `noImplicitAny`, and then adds `// @ts-expect-error`s to suppress existing errors this change raises. This'll help us keep code quality high moving forward. Going to just directly merge this once it passes CI; as with #288, this doesn't change any code, just comments.
This commit is contained in:
@@ -74,10 +74,12 @@ class Sorter<T = unknown> extends LitElement {
|
||||
}
|
||||
} else {
|
||||
this.sortedData.sort((first, second) => {
|
||||
// @ts-expect-error [// TODO: Fix this the next time the file is edited.] - TS7053 - Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'unknown'. | TS7053 - Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'unknown'.
|
||||
if (first[this.sortKey!] === second[this.sortKey!]) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// @ts-expect-error [// TODO: Fix this the next time the file is edited.] - TS7053 - Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'unknown'. | TS7053 - Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'unknown'.
|
||||
return this.sortDesc == first[this.sortKey!] < second[this.sortKey!]
|
||||
? 1
|
||||
: -1;
|
||||
|
||||
Reference in New Issue
Block a user