Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3c1bb1c

Browse files
committed
chore(typescript): add support for __DEBUG__ and glsl imports
1 parent 840d42f commit 3c1bb1c

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

packages/Main/src/global.d.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Consider all `import '*.glsl'` as imports of modules with a default string
2+
// export. This is coherent with the behavior of the babel compiler.
3+
declare module '*.glsl' {
4+
const glsl: string;
5+
export default glsl;
6+
}
7+
8+
// Declare the external global variable __DEBUG__. This is replaced by either
9+
// true or false during the compilation step.
10+
declare const __DEBUG__: boolean;

packages/Main/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"extends": "../../tsconfig.json",
3-
"include": [ "src/Main.js" ],
3+
"include": [ "src/Main.js", "src/global.d.ts" ],
44
"exclude": [ "lib" ],
55
"compilerOptions": {
66
"declaration": true,

0 commit comments

Comments
 (0)