@@ -29,15 +29,15 @@ type DiffableOpts = {
29
29
30
30
/**
31
31
* Dynamically create a state object that persists changes to durable storage using Proxy and SQLite.
32
- *
32
+ *
33
33
* ```
34
34
* import { DurableObject } from "cloudflare:workers";
35
35
* import { diffable } from "diffable-objects";
36
- *
36
+ *
37
37
* class Counter extends DurableObject {
38
38
* @diffable
39
39
* #state = { count: 0 };
40
- *
40
+ *
41
41
* async fetch(request) {
42
42
* this.#state.count += 1;
43
43
* return new Response(`Count: ${this.#state.count}`);
@@ -51,15 +51,15 @@ export function diffable(
51
51
) : FieldDecoratorReturn < any > ;
52
52
/**
53
53
* Dynamically create a state object that persists changes to durable storage using Proxy and SQLite.
54
- *
54
+ *
55
55
* ```
56
56
* import { DurableObject } from "cloudflare:workers";
57
57
* import { diffable } from "diffable-objects";
58
- *
58
+ *
59
59
* class Counter extends DurableObject {
60
60
* @diffable ("counter")
61
61
* #state = { count: 0 };
62
- *
62
+ *
63
63
* async fetch(request) {
64
64
* this.#state.count += 1;
65
65
* return new Response(`Count: ${this.#state.count}`);
@@ -70,15 +70,15 @@ export function diffable(
70
70
export function diffable ( name ?: string ) : FieldDecoratorFactoryReturn < any > ;
71
71
/**
72
72
* Dynamically create a state object that persists changes to durable storage using Proxy and SQLite.
73
- *
73
+ *
74
74
* ```
75
75
* import { DurableObject } from "cloudflare:workers";
76
76
* import { diffable } from "diffable-objects";
77
- *
77
+ *
78
78
* class Counter extends DurableObject {
79
79
* @diffable ({ name: "counter", snapshotPolicy: "never" })
80
80
* #state = { count: 0 };
81
- *
81
+ *
82
82
* async fetch(request) {
83
83
* this.#state.count += 1;
84
84
* return new Response(`Count: ${this.#state.count}`);
0 commit comments