fix: 修复 IGraph 中find 和 findall 第二个参数为可选

This commit is contained in:
baizn 2020-02-05 17:36:39 +08:00 committed by Moyee
parent f6d04ac26f
commit a2dc01a7c3
3 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@antv/g6",
"version": "3.3.0-beta.3",
"version": "3.3.0-beta.4",
"description": "A Graph Visualization Framework in JavaScript",
"keywords": [
"antv",

View File

@ -1,5 +1,5 @@
export default {
version: '3.3.0-beta.3',
version: '3.3.0-beta.4',
rootContainerClassName: 'root-container',
nodeContainerClassName: 'node-container',
edgeContainerClassName: 'edge-container',

View File

@ -445,7 +445,7 @@ export interface IGraph extends EventEmitter {
* @param {(item: T, index: number) => T} fn
* @return {T}
*/
find<T extends Item>(type: ITEM_TYPE, fn: (item: T, index: number) => boolean): T;
find<T extends Item>(type: ITEM_TYPE, fn: (item: T, index?: number) => boolean): T;
/**
*
@ -453,7 +453,7 @@ export interface IGraph extends EventEmitter {
* @param {string} fn
* @return {array}
*/
findAll<T extends Item>(type: ITEM_TYPE, fn: (item: T, index: number) => boolean): T[];
findAll<T extends Item>(type: ITEM_TYPE, fn: (item: T, index?: number) => boolean): T[];
/**
*