configcat / kotlin-sdk

ConfigCat SDK for Kotlin Multiplatform. ConfigCat is a hosted feature flag service: https://configcat.com. Manage feature toggles across frontend, backend, mobile, desktop apps. Alternative to LaunchDarkly. Management app + feature flag SDKs.
https://configcat.com/docs/sdk-reference/kotlin
MIT License
14 stars 0 forks source link

Get Value is not useable from non-inline Functions #35

Closed MrThreepwood closed 4 months ago

MrThreepwood commented 5 months ago

Is your feature request related to a problem? Please describe.

I would like to be able to fetch data from an interface implimentation. Interfaces don't have inline functions, and therefor can't have reified generic params.

Describe the solution you'd like

Making a getValue function that can take a Class or KClass would be convenient.

Describe alternatives you've considered

Currently I just have to use the Java SDK

novalisdenahi commented 5 months ago

Hi @MrThreepwood,

Thank you for your feedback! I'll put this topic on our next dev meeting's agenda to discuss it with the team. I'll let you know about the results.

In the meantime, I think you should check the getAnyValue method. This can be a solution for you as well I think.

Best Regards, Daniel

novalisdenahi commented 5 months ago

Hi @MrThreepwood,

Have you tried the getAnyValuemethod? Is it a good solution for you?

If not, can you show me a quick code example of how you would like to use the new method with the Kclass parameter or how you currently use the Java SDK getValue?

Thanks in advance! Daniel

github-actions[bot] commented 4 months ago

This issue is marked stale because it has no activity in the last 3 weeks. The issue will be closed in one week. Please remove the stale flag to keep it open.

github-actions[bot] commented 4 months ago

This issue was closed due to no activity.