Skip to content

Commit

Permalink
chore(docs): fix async for loop examples
Browse files Browse the repository at this point in the history
  • Loading branch information
jrasm91 committed Nov 14, 2023
1 parent 9d166ab commit 6a6a530
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion node/src/blockeventsrequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export interface BlockAndPrivateDataEventsRequest extends Signable {
* ```typescript
* const events = await network.getBlockAndPrivateEventsData();
* try {
* for async (const event of events) {
* for await (const event of events) {
* // Process block and private data event
* }
* } finally {
Expand Down
2 changes: 1 addition & 1 deletion node/src/chaincodeeventsrequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export interface ChaincodeEventsRequest extends Signable {
* ```typescript
* const events = await request.getEvents();
* try {
* for async (const event of events) {
* for await (const event of events) {
* // Process event
* }
* } finally {
Expand Down
8 changes: 4 additions & 4 deletions node/src/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import { SigningIdentity } from './signingidentity';
* startBlock: BigInt(101), // Ignored if the checkpointer has checkpoint state
* });
* try {
* for async (const event of events) {
* for await (const event of events) {
* // Process then checkpoint event
* await checkpointer.checkpointChaincodeEvent(event)
* }
Expand All @@ -54,7 +54,7 @@ import { SigningIdentity } from './signingidentity';
* startBlock: BigInt(101), // Ignored if the checkpointer has checkpoint state
* });
* try {
* for async (const event of events) {
* for await (const event of events) {
* // Process then checkpoint block
* await checkpointer.checkpointBlock(event.getHeader().getNumber())
* }
Expand Down Expand Up @@ -91,7 +91,7 @@ export interface Network {
* ```typescript
* const events = await network.getChaincodeEvents(chaincodeName, { startBlock: BigInt(101) });
* try {
* for async (const event of events) {
* for await (const event of events) {
* // Process event
* }
* } finally {
Expand Down Expand Up @@ -173,7 +173,7 @@ export interface Network {
* ```typescript
* const events = await network.getBlockAndPrivateEventsData({ startBlock: BigInt(101) });
* try {
* for async (const event of events) {
* for await (const event of events) {
* // Process block and private data event
* }
* } finally {
Expand Down

0 comments on commit 6a6a530

Please sign in to comment.