-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
34 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import type { InspectInspect } from "../inspect/ii"; | ||
import type { TableTable } from "../inspect/tt"; | ||
|
||
declare const ii: InspectInspect; | ||
declare const tt: TableTable | ||
|
||
export default function addNoopToGlobalScope(): void { | ||
const ii = <T>(value: T) => value; | ||
ii.defaults = {}; | ||
ii.depth = () => ii; | ||
ii.d = ii.depth; | ||
ii.keys = () => ii; | ||
ii.k = ii.keys; | ||
(global as any).ii = ii; | ||
|
||
const tt = <T>(value: T) => value; | ||
tt.defaults = {}; | ||
(global as any).tt = tt; | ||
} |
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,11 @@ | ||
import iiFn from "../inspect/ii"; | ||
import ttFn, { type TableTable } from "../inspect/tt"; | ||
import type { InspectInspect } from "../inspect/ii"; | ||
|
||
declare const ii: InspectInspect; | ||
declare const tt: TableTable; | ||
|
||
export default function addToGlobalScope(): void { | ||
(global as any).ii = iiFn; | ||
(global as any).tt = ttFn; | ||
} |