antvis/G6

graph.on 中回调入参类型声明与实际执行结果不一致 #3066

HustLiuCN posted onGitHub

<!-- ⚠️ ⚠️ ⚠️ 注意:请使用下面的链接来新建 issue: ⚠️ ⚠️ ⚠️ https://antv-issue-helper.surge.sh 不是用上面的链接创建的 issue 会被立即关闭。 -->

<!-- ⚠️ ⚠️ ⚠️ IMPORTANT: Please use the following link to create a new issue: ⚠️ ⚠️ ⚠️ https://antv-issue-helper.surge.sh If your issue was not created by using the link above, it will be closed immediately. -->

版本信息: g6@4.3.4 g6-core@0.3.4

代码片段:

graph.on('nodeselectedchange', e => {
  // 这里 TS 类型检测 e.target 不存在
  graph.setItemState(e.target, 'selected', true)
}

类型声明如下: image image

实际运行结果与官网文档一致: image


This issue has been closed because it has been outdate for a long time. Please open a new issue if you still need help. 这个 issue 已经被关闭,因为 它已经过期很久了。 如果你仍然需要帮助,请创建一个新的 issue。

posted by github-actions[bot] over 1 year ago

Fund this Issue

$0.00
Funded

Pull requests