Skip to content
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

In Counter DO example .clear() should be .reset() #7

Closed
grempe opened this issue Jun 24, 2021 · 1 comment
Closed

In Counter DO example .clear() should be .reset() #7

grempe opened this issue Jun 24, 2021 · 1 comment

Comments

@grempe
Copy link

grempe commented Jun 24, 2021

I believe this line in the example code in the README:

// reset the durable)
.get('/reset', ({ Counter }) => Counter.get('test').clear())

should be:

// reset the durable
.get('/reset', ({ Counter }) => Counter.get('test').reset())

Please also note the removal of the extraneous ) at the end of the comment.

Having an example that shows setting the default state would also be helpful in relation to .reset().

@kwhitley
Copy link
Owner

100% right, and fixed in the upcoming v1.x docs, thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants