Porting TypeScript's 'declare const' to Hegel
Thank you for developing Hegel. I've been looking for a typed FP in JavaScript, and I think Hegel fits the bill.
One issue, however, is that I'm looking to migrate global variables, objects, functions, etc. over to Hegel. For example, the following in TypeScript allows me to extend the NodeJS global namespace object:
`import { doGet } from './do-get';
declare const global: { [x: string]: any; };
global.doGet = function (e: any) { return doGet(e); };`
facts:
- hegel does not have
any(you should not need any in typed language) - hegel does not allow declare inside js file (i think it would be better to allow this)
- hegel does not have indexer properties (there are some attempts currently but it does not really work yet #238 #144)
what you can do is to declare globals in .d.ts file and if needed ignore line where you are assigning to global variable with @hegel-issue
@thecotne, Thank you a lot for your answer. Want to add one remark, that Hegel support indexer properties inside d.ts files.