hackerwins / codepair-old

Real-time markdown editor for interviews, meetings and more...
https://codepair-old.yorkie.dev
Apache License 2.0
90 stars 29 forks source link

Use the type in `yorkie-sdk-js` #110

Open ppeeou opened 3 years ago

ppeeou commented 3 years ago

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

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

mu-hun commented 2 years ago

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:

ppeeou commented 2 years ago

@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