-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: working on migrating instanceof examples to switch #1391
Conversation
case CacheGetResponse.Error: | ||
throw new Error( | ||
`An error occurred while attempting to get key 'test-key' from cache 'test-cache': ${result.errorCode()}: ${result.toString()}` | ||
); | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
most of the changes are in the next file, which is hidden due to "large diffs" 🤦
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Caught a couple small issues.
A non-blocker but for us to consider:
- Some of the inline comments are a guide to our users, eg in the topics examples where we set up a subscription, then publish.
- Others are comments that look more like to us. Can consider adding some metadata to the comment or making a comment "region" that is excluded from the docs
examples/nodejs/cache/doc-example-files/config-and-error-handling.ts
Outdated
Show resolved
Hide resolved
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions | ||
console.log(`List fetched successfully: ${result.valueList()}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to write this line so we can remove the eslint suppression from the docs?
examples/nodejs/cache/doc-example-files/doc-examples-js-apis.ts
Outdated
Show resolved
Hide resolved
// Need to close the stream before the example ends or else the example will hang. | ||
result.unsubscribe(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my comment about the parentheticals to ourselves vs users
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems useful for users too though?
Co-authored-by: Michael Landis <[email protected]>
…ing.ts Co-authored-by: Michael Landis <[email protected]>
No description provided.