-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 some type errors in JavaScript #21452
Changes from all commits
b8e3ce0
6541901
d0f6375
69250b4
a0f1fb5
f397eec
81b842e
f4a9b30
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1547,21 +1547,23 @@ function factory() { | |
const self = this; | ||
event_mixin(self, { }); | ||
|
||
self.client = client; | ||
self.iface = iface; | ||
self.path_namespace = path_namespace; | ||
|
||
let waits; | ||
|
||
self.wait = function(func) { | ||
if (func) | ||
waits.always(func); | ||
return waits; | ||
Comment on lines
+1556
to
+1559
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These 4 added lines are not executed by any test. |
||
}; | ||
|
||
Object.defineProperties(self, { | ||
client: { value: client, enumerable: false, writable: false }, | ||
iface: { value: iface, enumerable: false, writable: false }, | ||
path_namespace: { value: path_namespace, enumerable: false, writable: false }, | ||
wait: { | ||
enumerable: false, | ||
writable: false, | ||
value: function(func) { | ||
if (func) | ||
waits.always(func); | ||
return waits; | ||
} | ||
} | ||
client: { enumerable: false, writable: false }, | ||
iface: { enumerable: false, writable: false }, | ||
path_namespace: { enumerable: false, writable: false }, | ||
wait: { enumerable: false, writable: false }, | ||
}); | ||
|
||
/* Subscribe to signals once for all proxies */ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -790,7 +790,13 @@ const ServicesPageFilters = ({ | |
const onDeleteChipGroup = (typeLabel) => { | ||
const type = getFilterLabelKey(typeLabel); | ||
|
||
setFilters({ ...filters, [type]: [] }); | ||
if (type) | ||
setFilters({ ...filters, [type]: [] }); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This added line is not executed by any test. |
||
else | ||
setFilters({ | ||
activeState: [], | ||
fileState: [] | ||
Comment on lines
+796
to
+798
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These 3 added lines are not executed by any test. |
||
}); | ||
}; | ||
|
||
const onClearAllFilters = useCallback(() => { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,7 +53,6 @@ ignored_codes = [ | |
"TS7005", # Variable '*' implicitly has an 'any[]' type. | ||
"TS7006", # Parameter '*' implicitly has an 'any' type. | ||
"TS7008", # Member '*' implicitly has an 'any[]' type. | ||
"TS7009", # 'new' expression, whose target lacks a construct signature, implicitly has an 'any' type. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it's okay to remove this here as well. The problem is not the implicit "any", but that TS missed that something is a constructor, which is worth fixing even in relaxed code. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right, with that new approach we can and should fix similar instances |
||
"TS7010", # '*', which lacks return-type annotation, implicitly has an 'any' return type. | ||
"TS7015", # Element implicitly has an 'any' type because index expression is not of type '*'. | ||
"TS7016", # Could not find a declaration file for module '*'... | ||
|
@@ -72,13 +71,11 @@ javascript_ignored_codes = [ | |
"TS7005", # Variable '*' implicitly has an 'any[]' type. | ||
"TS7006", # Parameter '*' implicitly has an 'any' type. | ||
"TS7008", # Member '*' implicitly has an 'any[]' type. | ||
"TS7009", # 'new' expression, whose target lacks a construct signature, implicitly has an 'any' type. | ||
"TS7015", # Element implicitly has an 'any' type because index expression is not of type '*'. | ||
"TS7016", # Could not find a declaration file for module '*'... | ||
"TS7019", # Rest parameter '*' implicitly has an 'any[]' type | ||
"TS7022", # '*' implicitly has type 'any'... | ||
"TS7023", # '*' implicitly has return type 'any' because ... | ||
"TS7024", # Function implicitly has return type 'any' because ... | ||
"TS7031", # Binding element '*' implicitly has an 'any' type. | ||
"TS7034", # Variable '*' implicitly has type 'any' in some locations where its type cannot be determined. | ||
"TS7053", # Element implicitly has an 'any' type because expression of type 'any' can't be used to | ||
|
@@ -99,15 +96,10 @@ javascript_ignored_codes = [ | |
"TS2741", # Property 'X' is missing in type | ||
"TS2551", # Property 'X' does not exist on type | ||
"TS2304", # Cannot find name 'X' | ||
"TS2581", # Cannot find name '$'. Do you need to install type definitions for jQuery? | ||
"TS2305", # Module '"./machines/machines"' has no exported member 'get_init_superuser_for_options'. | ||
"TS2790", # The operand of a 'delete' operator must be optional. | ||
"TS2367", # This comparison appears to be unintentional because the types 'Error' and 'string' have no overlap. | ||
"TS2538", # Type 'null' cannot be used as an index type. | ||
"TS2559", # Type 'never[]' has no properties in common with type 'DBusCallOptions'. | ||
"TS2769", # No overload matches this call. | ||
"TS2739", # Type '{ title: string; value: string; }' is missing the following properties from type | ||
"TS2464", # A computed property name must be of type 'string', 'number', 'symbol', or 'any'. | ||
"TS2488", # Type 'X' must have a '[Symbol.iterator]()' method that returns an iterator. | ||
"TS2349", # This expression is not callable. | ||
"TS2554", # Expected 0 arguments, but got 1. | ||
|
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 added line is not executed by any test.