File tree Expand file tree Collapse file tree 1 file changed +6
-26
lines changed
Expand file tree Collapse file tree 1 file changed +6
-26
lines changed Original file line number Diff line number Diff line change 1- declare var global : any ;
2-
3- const fableGlobal : {
4- types : Map < string , FunctionConstructor > ,
5- symbols : {
6- reflection : symbol ,
7- generics : symbol ,
8- }
9- } = function ( ) {
10- const globalObj =
11- typeof window !== "undefined" ? window
12- : ( typeof global !== "undefined" ? global
13- : ( typeof self !== "undefined" ? self : { } ) ) ;
14- if ( typeof globalObj . __FABLE_CORE__ === "undefined" ) {
15- globalObj . __FABLE_CORE__ = {
16- types : new Map < string , FunctionConstructor > ( ) ,
17- symbols : {
18- reflection : Symbol ( "reflection" ) ,
19- }
20- } ;
21- }
22- return globalObj . __FABLE_CORE__ ;
23- } ( ) ;
1+ const types = new Map < string , FunctionConstructor > ( ) ;
242
253export function setType ( fullName : string , cons : FunctionConstructor ) {
26- fableGlobal . types . set ( fullName , cons ) ;
4+ types . set ( fullName , cons ) ;
275}
286
297export function getType ( fullName : string ) {
30- return fableGlobal . types . get ( fullName ) ;
8+ return types . get ( fullName ) ;
319}
3210
33- export default ( fableGlobal . symbols ) ;
11+ export default {
12+ reflection : Symbol ( "reflection" )
13+ }
You can’t perform that action at this time.
0 commit comments