Skip to content
This repository has been archived by the owner on Dec 7, 2021. It is now read-only.

Use type roots index.d.ts #1

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/file.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
console.log(`In environment: ${GLOBAL_SETTINGS.ENV}`);

if (GLOBAL_SETTINGS.DEBUG) {
console.debug('Debug enabled');
console.debug('Debug enabled??');
}

if (OTHER_GLOBAL_TYPE) {
console.debug('Other global enabled');
}
3 changes: 3 additions & 0 deletions types/global.d.ts → types/global/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/** Just assume this is some globally available variable. */
declare const OTHER_GLOBAL_TYPE = true;

/** Just assume this is some globally available variable. */
declare const GLOBAL_SETTINGS: {
ENV: 'development' | 'production';
Expand Down