Skip to content

Commit bc417b4

Browse files
committed
Fixing bad Prettier automation in <code> blocks.
1 parent 0d84c9c commit bc417b4

File tree

1 file changed

+11
-51
lines changed

1 file changed

+11
-51
lines changed

src/content/docs/durable-objects/api/storage-api.mdx

Lines changed: 11 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -55,19 +55,11 @@ Each method is implicitly wrapped inside a transaction, such that its results ar
5555

5656
### `get`
5757

58-
- <code>
59-
get(key <Type text="string" />, options <Type text="Object" />{" "}
60-
<MetaInfo text="optional" />)
61-
</code>
62-
: <Type text="Promise<any>" />
58+
- <code>get(key <Type text="string" />, options <Type text="Object" />{" "}<MetaInfo text="optional" />)</code>: <Type text="Promise<any>" />
6359

6460
- Retrieves the value associated with the given key. The type of the returned value will be whatever was previously written for the key, or undefined if the key does not exist.
6561

66-
- <code>
67-
get(keys <Type text="Array<string>" />, options <Type text="Object" />{" "}
68-
<MetaInfo text="optional" />)
69-
</code>
70-
: <Type text="Promise<Map<string, any>>" />
62+
- <code>get(keys <Type text="Array<string>" />, options <Type text="Object" />{" "}<MetaInfo text="optional" />)</code>: <Type text="Promise<Map<string, any>>" />
7163

7264
- Retrieves the values associated with each of the provided keys. The type of each returned value in the [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) will be whatever was previously written for the corresponding key. Results in the `Map` will be sorted in increasing order of their UTF-8 encodings, with any requested keys that do not exist being omitted. Supports up to 128 keys at a time.
7365

@@ -83,48 +75,29 @@ Each method is implicitly wrapped inside a transaction, such that its results ar
8375

8476
### `put`
8577

86-
- <code>
87-
put(key <Type text="string" />, value <Type text="any" />, options{" "}
88-
<Type text="Object" /> <MetaInfo text="optional" />)
89-
</code>
90-
: <Type text="Promise" />
78+
- <code>put(key <Type text="string" />, value <Type text="any" />, options{" "}<Type text="Object" /> <MetaInfo text="optional" />)</code>: <Type text="Promise" />
9179

9280
- Stores the value and associates it with the given key. The value can be any type supported by the [structured clone algorithm](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm), which is true of most types. Keys are limited to a max size of 2,048 bytes and values are limited to 128 KiB (131,072 bytes).<br/><br/>
9381

94-
- <code>
95-
put(entries <Type text="Object" />, options <Type text="Object" />{" "}
96-
<MetaInfo text="optional" />)
97-
</code>
98-
: <Type text="Promise" />
82+
- <code>put(entries <Type text="Object" />, options <Type text="Object" />{" "}<MetaInfo text="optional" />)</code>: <Type text="Promise" />
9983

10084
- Takes an Object and stores each of its keys and values to storage.
10185
- Each value can be any type supported by the [structured clone algorithm](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm), which is true of most types.
10286
- Supports up to 128 key-value pairs at a time. Each key is limited to a maximum size of 2,048 bytes and each value is limited to 128 KiB (131,072 bytes).
10387

10488
### `delete`
10589

106-
- <code>
107-
delete(key <Type text="string" />, options <Type text="Object" />{" "}
108-
<MetaInfo text="optional" />)
109-
</code>
110-
: <Type text="Promise<boolean>" />
90+
- <code>delete(key <Type text="string" />, options <Type text="Object" />{" "}<MetaInfo text="optional" />)</code>: <Type text="Promise<boolean>" />
11191

11292
- Deletes the key and associated value. Returns `true` if the key existed or `false` if it did not.
11393

114-
- <code>
115-
delete(keys <Type text="Array<string>" />, options <Type text="Object" />{" "}
116-
<MetaInfo text="optional" />)
117-
</code>
118-
: <Type text="Promise<number>" />
94+
- <code>delete(keys <Type text="Array<string>" />, options <Type text="Object" />{" "}<MetaInfo text="optional" />)</code>: <Type text="Promise<number>" />
11995

12096
- Deletes the provided keys and their associated values. Supports up to 128 keys at a time. Returns a count of the number of key-value pairs deleted.
12197

12298
### `deleteAll`
12399

124-
- <code>
125-
deleteAll(options <Type text="Object" /> <MetaInfo text="optional" />)
126-
</code>
127-
: <Type text="Promise" />
100+
- <code>deleteAll(options <Type text="Object" /> <MetaInfo text="optional" />)</code>: <Type text="Promise" />
128101

129102
- Deletes all stored data, effectively deallocating all storage used by the Durable Object. For Durable Objects with a key-value storage backend, `deleteAll()` removes all keys and associated values for an individual Durable Object. For Durable Objects with a [SQLite storage backend](/durable-objects/best-practices/access-durable-objects-storage/#sqlite-storage-backend), `deleteAll()` removes the entire contents of a Durable Object's private SQLite database, including both SQL data and key-value data.
130103
- For Durable Objects with a key-value storage backend, an in-progress `deleteAll()` operation can fail, which may leave a subset of data undeleted. Durable Objects with a SQLite storage backend do not have a partial `deleteAll()` issue because `deleteAll()` operations are atomic (all or nothing).
@@ -164,10 +137,7 @@ The `put()` method returns a `Promise`, but most applications can discard this p
164137

165138
### `list`
166139

167-
- <code>
168-
list(options <Type text="Object" /> <MetaInfo text="optional" />)
169-
</code>
170-
: <Type text="Promise<Map<string, any>>" />
140+
- <code>list(options <Type text="Object" /> <MetaInfo text="optional" />)</code>: <Type text="Promise<Map<string, any>>" />
171141

172142
- Returns all keys and values associated with the current Durable Object in ascending sorted order based on the keys' UTF-8 encodings.
173143

@@ -246,10 +216,7 @@ The `put()` method returns a `Promise`, but most applications can discard this p
246216

247217
### `getAlarm`
248218

249-
- <code>
250-
getAlarm(options <Type text="Object" /> <MetaInfo text="optional" />)
251-
</code>
252-
: <Type text="Promise<Number | null>" />
219+
- <code>getAlarm(options <Type text="Object" /> <MetaInfo text="optional" />)</code>: <Type text="Promise<Number | null>" />
253220

254221
- Retrieves the current alarm time (if set) as integer milliseconds since epoch. The alarm is considered to be set if it has not started, or if it has failed and any retry has not begun. If no alarm is set, `getAlarm()` returns `null`.
255222

@@ -259,11 +226,7 @@ The `put()` method returns a `Promise`, but most applications can discard this p
259226

260227
### `setAlarm`
261228

262-
- <code>
263-
setAlarm(scheduledTime <Type text="Date | number" />, options{" "}
264-
<Type text="Object" /> <MetaInfo text="optional" />)
265-
</code>
266-
: <Type text="Promise" />
229+
- <code>setAlarm(scheduledTime <Type text="Date | number" />, options{" "}<Type text="Object" /> <MetaInfo text="optional" />)</code>: <Type text="Promise" />
267230

268231
- Sets the current alarm time, accepting either a JavaScript `Date`, or integer milliseconds since epoch.
269232

@@ -277,10 +240,7 @@ The `put()` method returns a `Promise`, but most applications can discard this p
277240

278241
### `deleteAlarm`
279242

280-
- <code>
281-
deleteAlarm(options <Type text="Object" /> <MetaInfo text="optional" />)
282-
</code>
283-
: <Type text="Promise" />
243+
- <code>deleteAlarm(options <Type text="Object" /> <MetaInfo text="optional" />)</code>: <Type text="Promise" />
284244

285245
- Deletes the alarm if one exists. Does not cancel the alarm handler if it is currently executing.
286246

0 commit comments

Comments
 (0)