Skip to content

Commit

Permalink
Fix typescript@next support
Browse files Browse the repository at this point in the history
The newest typescript catches a real proble. This type wasn't correct. You can only use a type predicate if your implementation returns a boolean, but this implementation very deliberately returns its argument if that argument passes a check.
  • Loading branch information
ef4 committed Dec 12, 2024
1 parent cb59342 commit d8bed39
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/@ember/-internals/environment/lib/global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
declare const mainContext: object | undefined;

// from lodash to catch fake globals
function checkGlobal(value: any | null | undefined): value is object {
function checkGlobal(value: any | null | undefined): object | undefined {
return value && value.Object === Object ? value : undefined;
}

Expand Down

0 comments on commit d8bed39

Please sign in to comment.