larksuite / node-sdk

larksuite open sdk for nodejs
MIT License
131 stars 26 forks source link

fix: change bnpm.byted.org to registry.yarnpkg.com #83

Closed yunnysunny closed 2 months ago

yunnysunny commented 2 months ago

We can not download the package from bnpm.byted.org as it's bytecode's private registry. So I change it to offical link.

mazhe-nerd commented 2 months ago

感谢同学PR,能否只提交对yarn.lock文件的修改?

  1. wrokflows下的代码看起来和特定的业务相关,SDK本身应该不太需要
  2. code-gen里的代码每次都会根据开放平台最新的文档自动生成,手动改的会被覆盖,如果有自定义的types建议可以在使用的地方extends
yunnysunny commented 2 months ago

本来只想提供yarn.lock的代码,后来忘记这件事情了

yunnysunny commented 2 months ago

这个pull request可以关闭了。 不过我想说一下第二点, https://github.com/larksuite/node-sdk/blob/dad0569084698f50fef29a11bf9761903bfa093a/dispatcher/event.ts#L71-L83 这里的函数参数类型是 IHandles,做一个子interface继承它是没有用的。 还有一点,贵公司内部用的node版本是 16 吧,我看测试用例在 16 上能跑,18 上运行失败。

mazhe-nerd commented 2 months ago

Get

  1. 看起来可以给register函数加一个范型来接收自定义的events描述,我加一下,像这样: register<T = {}>(handles: IHandles & T)
  2. 开发的时候是是这样,具体情况我再看看

感谢同学

mazhe-nerd commented 2 months ago

@yunnysunny 1.29.0register支持范型了,可以试试register<{customEvent: xxxx}>()

yunnysunny commented 2 months ago

@yunnysunny 1.29.0register支持范型了,可以试试register<{customEvent: xxxx}>()

我现在工作已经停滞了,我始终没有搞懂如何触发飞书的事件回调 🤣