-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #212 from flatironinstitute/resolve-spurious-unrea…
…chable-errors Resolve spurious 'unreachable code' errors
- Loading branch information
Showing
5 changed files
with
96 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import baseObjectCheck from "./baseObjectCheck"; | ||
|
||
// monaco-editor has a call to globalThis.postMessage with the '*' target | ||
// so our workers will recieve this message. We ignore it to prevent | ||
// anything weird from happening. | ||
export const isMonacoWorkerNoise = (obj: any): boolean => | ||
!baseObjectCheck(obj) || | ||
Object.prototype.hasOwnProperty.call(obj, "vscodeScheduleAsyncWork"); |