remolacha icon indicating copy to clipboard operation
remolacha copied to clipboard

Import remolacha's types in apps

Open juanlao7 opened this issue 5 years ago • 0 comments

After spending a couple of days I couldn't figure out how to import the types of the remolacha base module in apps.

  • Remolacha's modules are publicly available in window.remolacha because webpack.config.json defines output.library = 'remolacha'. Apps have access to the module without having to embed remolacha's code in each app.
  • Remolacha's types are automatically generated in types/remolacha/index.d.ts, but I could not find a way of importing them from apps.

The current workaround is that apps just do declare var remolacha : any; to get access to the remolacha object, but that's dirty.

juanlao7 avatar Dec 21 '20 23:12 juanlao7