0

I have httpClient with methods in prototype like get, post, put etc. And it's working and visible in this file:

visible prototype

And i export it:

exported client

But if i try to import this in another file import httpClient from './httpClient', i dont see prototype methods:

enter image description here

How to import it with visible methods for this module?

deceze
  • 510,633
  • 85
  • 743
  • 889
Marty
  • 534
  • 8
  • 24
  • 1
    it's a typescript question and it have something todo that there is no `.d.ts` file for the module (the Declaration File) https://stackoverflow.com/questions/21247278/about-d-ts-in-typescript – Scriptkiddy1337 Aug 30 '19 at 07:22
  • 1
    Prototype should be there. It doesn't matter that your code editor is not showing it. Could you console log httpClient and check in the console its prototype? – Lazar Nikolic Aug 30 '19 at 07:25
  • @LazarNikolic Yes, it's doesn't matter that my editor is not showing, it works, just that uncomfortable – Marty Aug 30 '19 at 07:29
  • what if you document it and declare the prototype as a member of the httpClient – Kevin.a Aug 30 '19 at 07:31
  • @Marty so, there is a prototype? – Lazar Nikolic Aug 30 '19 at 07:35
  • what does your `create()` method looks like? Sample project would be helpful – lena Aug 30 '19 at 18:20

0 Answers0