Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing type definitions for cast method #175

Open
cajoy opened this issue Dec 10, 2020 · 2 comments
Open

Missing type definitions for cast method #175

cajoy opened this issue Dec 10, 2020 · 2 comments
Assignees
Labels
bug? V3 v2019-10-10 Client

Comments

@cajoy
Copy link

cajoy commented Dec 10, 2020

Describe the bug

I am trying to cast on subscription recurly.Subscription.cast(...) but getting following error:

Property 'cast' does not exist on type 'typeof Subscription'.

Expected behavior

Should be no typescript errors

Your Environment

3.18.0

@cajoy cajoy added the bug? label Dec 10, 2020
@douglasmiller
Copy link
Contributor

Thank you for creating an issue, @cajoy.

This cast method is intended to be an internal method for casting an API response into a Resource. There shouldn't be any need to invoke it directly. What is your use case for making use of the cast method directly?

@douglasmiller douglasmiller self-assigned this Dec 10, 2020
@cajoy
Copy link
Author

cajoy commented Dec 10, 2020

Why using it for testing.

I see your point. If it meant to be internal then we can do something like

(recurly.Subscription as any).cast(...)

But would be better if still can be exposed via interface

@joannasese joannasese added the V3 v2019-10-10 Client label Feb 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug? V3 v2019-10-10 Client
Projects
None yet
Development

No branches or pull requests

3 participants