-
Notifications
You must be signed in to change notification settings - Fork 80
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(examples): enable eslint/strict-boolean-expressions and strictNullChecks #1095
chore(examples): enable eslint/strict-boolean-expressions and strictNullChecks #1095
Conversation
@@ -80,7 +80,7 @@ WoT.produce({ | |||
const listToDelete = []; | |||
for (const id of countdowns.keys()) { | |||
const as = countdowns.get(id); | |||
if (as !== undefined && as.output !== undefined) { | |||
if ((as === null || as === void 0 ? void 0 : as.output) !== undefined) { |
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.
Interesting to see what the tool-chain makes out of
if (as?.output !== undefined) {
Note: This is not a change in this PR.. we might have forgotten to update the JS in a previous PR..
@@ -396,7 +396,7 @@ Assumes one medium americano if not specified, but time and mode are mandatory f | |||
const paramsp = (await params.value()) as Record<string, unknown>; // : any = await Helpers.parseInteractionOutput(params); | |||
|
|||
// Check if uriVariables are provided | |||
if (paramsp && typeof paramsp === "object" && "time" in paramsp && "mode" in paramsp) { | |||
if (paramsp != null && typeof paramsp === "object" && "time" in paramsp && "mode" in paramsp) { |
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.
Note: What is also "interesting" here is that we cannot simply remove the
paramsp != null
check.
the following code
const paramsp = null;
if (typeof paramsp === "object") {
console.log("null is object")
}
prints null is object
any reviewer for this PR? It is a very simple one ;-) Note: Only the .ts files are of interest since the .js files are generated out of it... |
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, there we go! lgtm.
This PR addresses one checkmark in #1046.