Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Chris Krycho <hello@chriskrycho.com>
  • Loading branch information
2 people authored and wagenet committed Jan 10, 2024
1 parent 52ba43d commit 46134da
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/@ember/debug/lib/warn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,10 @@ if (DEBUG) {
assert(missingOptionsDeprecation, Boolean(options));
assert(missingOptionsIdDeprecation, Boolean(options && options.id));

// SAFETY: we checked this by way of the `arguments` check above.
invoke('warn', message, test as boolean, options);
// SAFETY: we have explicitly assigned `false` if the user invoked the
// arity-2 version of the overload, so we know `test` is always either
// `undefined` or a `boolean` for type-safe callers.
invoke('warn', message, test as boolean | undefined, options);
};
}

Expand Down

0 comments on commit 46134da

Please sign in to comment.