Skip to content

Commit

Permalink
typescript: disable generation typings for globalThis
Browse files Browse the repository at this point in the history
As it's already builtin to typescript and conflicts:

> types/main.d.ts:12547:15 - error TS2397: Declaration name conflicts with built-in global identifier 'globalThis'.
>
> 12547 declare const globalThis: any;
>                     ~~~~~~~~~~
  • Loading branch information
bobrippling committed Apr 25, 2024
1 parent 3d0a317 commit 8bf1265
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/jswrap_functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,14 @@ A reference to the global scope, where everything is defined.
"type" : "variable",
"name" : "globalThis",
"generate" : "jswrap_global",
"return" : ["JsVar","The global scope"]
"return" : ["JsVar","The global scope"],
"typescript" : "// globalThis - builtin"
}
A reference to the global scope, where everything is defined.
This is identical to `global` but was introduced in the ECMAScript spec.
*/
// no typescript generated for globalThis, it's already builtin to typescript

/*JSON{
"type" : "variable",
Expand Down

0 comments on commit 8bf1265

Please sign in to comment.