problem description
-
ordinary declare
declare function hello1(s: string):void; -
declare global
declare global { function hello2(s: string):void }
declare any of the above in the declaration file xxx.d.ts , hello1/hello2,
can be detected and accessed globally, so what is the difference between the two declaration methods?
is mainly declare global how should I use it? I can"t find this usage in the official documents
