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

Supporting types generated dts gen #442

Closed

Conversation

mura-
Copy link
Contributor

@mura- mura- commented Sep 29, 2020

Why

Index signature type error occurs when I using types generated by kintone-dts-gen as generics.
image

I want to use types generated by kintone-dts-gen without casting.

What

I've extended Record type to support kintone-dts-gen types as well.
Could you please check if this implementation is okay?

How to test

Now I editing.

Checklist

  • Read CONTRIBUTING.md
  • Updated documentation if it is required.
  • Added tests if it is required.
  • Passed yarn lint and yarn test on the root directory.

@mura- mura- requested review from a team, zaki-yama and b4h0-c4t and removed request for a team September 29, 2020 07:22
@koba04
Copy link
Contributor

koba04 commented Sep 30, 2020

@mura-
Thank you for submitting a pull request!
We've recognized the issue.

Extending the Record is not a way we intent.
Unfortunately, the type definition dts-gen generates is intended to use with kintone JS API rather than rest-api-client, so it doesn't work well with rest-api-client.
But we think it is not ideal, so we are going to provide a way to generate type definitions that work well with rest-api-client in the future roadmap.

We are currently working on exposing type definitions to define type definitions for your app.
It makes it possible to define type definitions for your application, it requires defining type definitions manually, though.
#404

@koba04 koba04 added feature request Feature request pkg: rest-api-client @kintone/rest-api-client labels Sep 30, 2020
@mura-
Copy link
Contributor Author

mura- commented Sep 30, 2020

@koba04

Extending the Record is not a way we intent.

I understood. 👍

We are currently working on exposing type definitions to define type definitions for your app.
It makes it possible to define type definitions for your application, it requires defining type definitions manually, though.

Got it.
I'm looking forward to the completion of that PR 🙌

@koba04
Copy link
Contributor

koba04 commented Sep 30, 2020

@mura- Thank you for your understanding! This is very helpful feedback for us, thank you!

@koba04
Copy link
Contributor

koba04 commented Oct 5, 2020

@mura-
I've created an issue to fix this as #445
So I'll close this as I mentioned at #442 (comment), but thank you for your work!!! 👏 👏 👏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Feature request pkg: rest-api-client @kintone/rest-api-client
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants