Skip to content

Commit

Permalink
Revert "update global variable exports" (#67)
Browse files Browse the repository at this point in the history
* Revert "update global variable exports (#65)"

This reverts commit 93a918f.

* chore: commit changeset
  • Loading branch information
dtjones404 authored Dec 13, 2022
1 parent dcf5b81 commit 7c0502e
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 25 deletions.
5 changes: 5 additions & 0 deletions .changeset/pink-donuts-repair.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@krakenjs/typescript-config-grumbler": patch
---

Revert global variable update
48 changes: 24 additions & 24 deletions packages/typescript-config-grumbler/declarations.ts
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
/* eslint @typescript-eslint/no-unused-vars: "off" */
export const ENV = {
LOCAL: "local",
STAGE: "stage",
SANDBOX: "sandbox",
PRODUCTION: "production",
TEST: "test",
DEMO: "demo",
} as const;
LOCAL: "local" as "local",
STAGE: "stage" as "stage",
SANDBOX: "sandbox" as "sandbox",
PRODUCTION: "production" as "production",
TEST: "test" as "test",
DEMO: "demo" as "demo",
};

export interface Global {
__TEST__: boolean;
__WEB__: boolean;
__MIN__: boolean;
__DEBUG__: boolean;
__ENV__: typeof ENV[keyof typeof ENV];
__TREE_SHAKE__: boolean;
type $Values<O extends Record<string, unknown>> = O[keyof O];

// eslint-disable-next-line @typescript-eslint/no-explicit-any
__WINDOW__: any;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
__GLOBAL__: any;
declare let __TEST__: boolean;
declare let __WEB__: boolean;
declare let __MIN__: boolean;
declare let __DEBUG__: boolean;
declare let __ENV__: $Values<typeof ENV>;
declare let __TREE_SHAKE__: boolean;

__LOCAL__: boolean;
__STAGE__: boolean;
__SANDBOX__: boolean;
__PRODUCTION__: boolean;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
declare let __WINDOW__: any;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
declare let __GLOBAL__: any;

__UID__: string;
}
declare let __LOCAL__: boolean;
declare let __STAGE__: boolean;
declare let __SANDBOX__: boolean;
declare let __PRODUCTION__: boolean;

declare let __UID__: string;
1 change: 0 additions & 1 deletion packages/typescript-config-grumbler/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"exclude": ["dist/**/*"],
"files": ["./declarations.ts"],
"compilerOptions": {
"target": "es5",
"module": "commonjs",
Expand Down

0 comments on commit 7c0502e

Please sign in to comment.