WFCD / warframe-items

đŸ“˜ Get all Warframe items directly from Warframe's API. No more messy wikia scraping.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

:rocket: Exporting Typescript interfaces and types

Shoonkey opened this issue · comments

Is your enhancement request related to a problem? Please describe.
I'm developing a Discord bot that uses the library using Typescript, and I noticed that even though the API has typings, they're not exported.

Describe the upgrade you'd like
I think it'd be really useful to have access to the library types to integrate code better with it.

Describe alternatives you've considered
Currently the options I've thought about are either duplicate the necessary types in my own code or access a custom fork of the library where types are exported.

Additional context
image

commented

We already export types...

I see.
For some reason I can't import them from my code. Do you know why this might be happening?

commented

@AyAyEm do you have issues importing them?

No problem at all...
image
@Shoonkey could you make this example not work?
https://stackblitz.com/edit/node-ekc9ru?file=index.ts
I've altered the test script to run tsc without emitting files.

Interesting, it seems like it was my IDE that wasn't finding the types for autocompletion. It's working normally, sorry for the misunderstanding and thanks for the help!