WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 9f741e1

Browse files
authored
Merge pull request #21294 from Yurunsoft/fix-each-example
chore: fix the `each` method example description
2 parents 37209e2 + 919bfff commit 9f741e1

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/data/DataStore.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1088,8 +1088,8 @@ class DataStore {
10881088
* Data iteration
10891089
* @param ctx default this
10901090
* @example
1091-
* list.each('x', function (x, idx) {});
1092-
* list.each(['x', 'y'], function (x, y, idx) {});
1091+
* list.each(0, function (x, idx) {});
1092+
* list.each([0, 1], function (x, y, idx) {});
10931093
* list.each(function (idx) {})
10941094
*/
10951095
each(dims: DimensionIndex[], cb: EachCb): void {

src/data/SeriesData.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -884,6 +884,8 @@ class SeriesData<
884884
* @example
885885
* list.each('x', function (x, idx) {});
886886
* list.each(['x', 'y'], function (x, y, idx) {});
887+
* list.each(0, function (x, idx) {});
888+
* list.each([0, 1], function (x, y, idx) {});
887889
* list.each(function (idx) {})
888890
*/
889891
each<Ctx>(cb: EachCb0<Ctx>, ctx?: Ctx, ctxCompat?: Ctx): void;

0 commit comments

Comments
 (0)