codepair-old icon indicating copy to clipboard operation
codepair-old copied to clipboard

Use the type in `yorkie-sdk-js`

Open ppeeou opened this issue 3 years ago • 2 comments

Description: Use the type provided by yorkie-js-sdk

Why: we can code by knowing the parts provided by yorkie-js-sdk better.

ppeeou avatar May 11 '21 15:05 ppeeou

I'm interested in this issue, and it seems to be using the type definitions defined from yorkie-js-sdk module just fine.

but I still don't understand what needs to be changed. 🤔 :eyes:

mu-hun avatar Jul 27 '22 11:07 mu-hun

@x86chi Previously, the methods provided in the SDK did not match the methods we were actually using.

Related issues https://github.com/yorkie-team/yorkie-js-sdk/issues/205#issuecomment-898858674

Solved PR https://github.com/yorkie-team/yorkie-js-sdk/pull/289 https://github.com/yorkie-team/yorkie-js-sdk/pull/300 https://github.com/yorkie-team/yorkie-js-sdk/pull/299

Currently, the provided methods are matched all what we use https://yorkie.dev/yorkie-js-sdk/yorkie-js-sdk.jsonarray.html

so I think it is better to use a combination of generics and sdk methods without defining types in codepair anymore. https://github.com/yorkie-team/codepair/blob/main/src/features/docSlices.ts#L71

ppeeou avatar Jul 27 '22 16:07 ppeeou