antvis/G6

The issue has been closed
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)
}
类型声明如下:
实际运行结果与官网文档一致: