Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

How can types pass through from this lib? #5

Open
nickoneill opened this issue Jun 7, 2018 · 3 comments
Open

How can types pass through from this lib? #5

nickoneill opened this issue Jun 7, 2018 · 3 comments

Comments

@nickoneill
Copy link
Member

I'm working with checkAndRenewSession(profile: UserProfile, authToken: string): Promise<AuthResponse> right now, which the parent component thinks returns any. I understand this is compiled to JS before the parent component integrates it, removing the typescript annotations. I never noticed any complaints about a lack of a .d.ts file like with other components. Can we create and pass one to maintain types between projects?

@cdoremus

@cdoremus
Copy link
Contributor

cdoremus commented Jun 8, 2018

I have been thinking about creating a type declaration file (index.d.ts) for some time and have done some research on how to do it, so I'd like to take on this one as soon as I wrap up my current work on CSS integration, which should happen in the next few days.

@nickoneill
Copy link
Member Author

Awesome, thanks! I have to admit, I have tried creating .d.ts files for a few libraries that didn't have typescript support and I have failed a bunch. I don't know why it's so hard, but it seems like a really useful skill to have if we're working in typescript long term.

Do you know why it doesn't complain about the lack of typing like it does with a normal untyped library?

@cdoremus
Copy link
Contributor

Work being done in PR #6

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants