Skip to content

Commit

Permalink
docs(nodejs): fix some example code errors (#2277)
Browse files Browse the repository at this point in the history
  • Loading branch information
C-Dao authored May 21, 2023
1 parent cd951cc commit e2f3a2a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions bindings/nodejs/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ export class Operator {
* ### Example
* ```javascript
* const lister = await op.scan("/path/to/dir/");
* while (true)) {
* while (true) {
* const entry = await lister.next();
* if (entry === null) {
* break;
Expand All @@ -224,7 +224,7 @@ export class Operator {
* ### Example
* ```javascript
* const lister = op.scan_sync(/path/to/dir/");
* while (true)) {
* while (true) {
* const entry = lister.next();
* if (entry === null) {
* break;
Expand Down Expand Up @@ -292,7 +292,7 @@ export class Operator {
* ### Example
* ```javascript
* const lister = await op.list("path/to/dir/");
* while (true)) {
* while (true) {
* const entry = await lister.next();
* if (entry === null) {
* break;
Expand All @@ -315,7 +315,7 @@ export class Operator {
* ### Example
* ```javascript
* const lister = op.listSync("path/to/dir/");
* while (true)) {
* while (true) {
* const entry = lister.next();
* if (entry === null) {
* break;
Expand Down
8 changes: 4 additions & 4 deletions bindings/nodejs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ impl Operator {
/// ### Example
/// ```javascript
/// const lister = await op.scan("/path/to/dir/");
/// while (true)) {
/// while (true) {
/// const entry = await lister.next();
/// if (entry === null) {
/// break;
Expand All @@ -346,7 +346,7 @@ impl Operator {
/// ### Example
/// ```javascript
/// const lister = op.scan_sync(/path/to/dir/");
/// while (true)) {
/// while (true) {
/// const entry = lister.next();
/// if (entry === null) {
/// break;
Expand Down Expand Up @@ -426,7 +426,7 @@ impl Operator {
/// ### Example
/// ```javascript
/// const lister = await op.list("path/to/dir/");
/// while (true)) {
/// while (true) {
/// const entry = await lister.next();
/// if (entry === null) {
/// break;
Expand All @@ -451,7 +451,7 @@ impl Operator {
/// ### Example
/// ```javascript
/// const lister = op.listSync("path/to/dir/");
/// while (true)) {
/// while (true) {
/// const entry = lister.next();
/// if (entry === null) {
/// break;
Expand Down

0 comments on commit e2f3a2a

Please sign in to comment.