Skip to content

Commit ccd6b87

Browse files
committed
Adding backticks to all methods in headings.
1 parent 36b16e7 commit ccd6b87

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,20 @@ Alarms can be used to build distributed primitives, like queues or batching of w
2929

3030
## Storage methods
3131

32-
### getAlarm
32+
### `getAlarm`
3333

3434
- <code>getAlarm()</code>: <Type text="number | null" />
3535

3636
- If there is an alarm set, then return the currently set alarm time as the number of milliseconds elapsed since the UNIX epoch. Otherwise, return `null`.
3737

38-
### setAlarm
38+
### `setAlarm`
3939

4040
- <code>{" "}setAlarm(scheduledTimeMs <Type text="number" />)</code>
4141
: <Type text="void" />
4242

4343
- Set the time for the alarm to run. Specify the time as the number of milliseconds elapsed since the UNIX epoch.
4444

45-
### deleteAlarm
45+
### `deleteAlarm`
4646

4747
- `deleteAlarm()`: <Type text='void' />
4848

@@ -52,7 +52,7 @@ Alarms can be used to build distributed primitives, like queues or batching of w
5252

5353
## Handler methods
5454

55-
### alarm
55+
### `alarm`
5656

5757
- `alarm()`: <Type text='void' />
5858

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ The `put()` method returns a `Promise`, but most applications can discard this p
233233

234234
<br/> If `setAlarm()` is called with a time equal to or before `Date.now()`, the alarm will be scheduled for asynchronous execution in the immediate future. If the alarm handler is currently executing in this case, it will not be canceled. Alarms can be set to millisecond granularity and will usually execute within a few milliseconds after the set time, but can be delayed by up to a minute due to maintenance or failures while failover takes place.
235235

236-
### deleteAlarm
236+
### `deleteAlarm`
237237

238238
* <code>deleteAlarm(options <Type text='Object' /> <MetaInfo text='optional' />)</code>: <Type text ='Promise' />
239239

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

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,23 @@ To learn more about WebSocket Hibernation, refer to [Build a WebSocket server wi
2525

2626
## Extensions to WebSocket API
2727

28-
### serializeAttachment
28+
### `serializeAttachment`
2929

3030
- <code> serializeAttachment(value <Type text="any" />)</code>: <Type text="void" />
3131

3232
- Keeps a copy of `value` in memory (not on disk) to survive hibernation. 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.
3333

3434
- If you modify `value` after calling this method, those changes will not be retained unless you call this method again. The serialized size of `value` is limited to 2,048 bytes, otherwise this method will throw an error. If you need larger values to survive hibernation, use the [Storage API](/durable-objects/api/storage-api/) and pass the corresponding key to this method so it can be retrieved later.
3535

36-
### deserializeAttachment
36+
### `deserializeAttachment`
3737

3838
- `deserializeAttachment()`: <Type text='any' />
3939

4040
- Retrieves the most recent value passed to `serializeAttachment()`, or `null` if none exists.
4141

4242
## State Methods
4343

44-
### acceptWebSocket
44+
### `acceptWebSocket`
4545

4646
- <code>acceptWebSocket(ws <Type text="WebSocket" />, tags{" "}<Type text="Array<string>" /> <MetaInfo text="optional" />)</code>: <Type text="void" />
4747

@@ -53,7 +53,7 @@ To learn more about WebSocket Hibernation, refer to [Build a WebSocket server wi
5353

5454
- The WebSocket Hibernation API permits a maximum of 32,768 WebSocket connections per Durable Object, but the CPU and memory usage of a given workload may further limit the practical number of simultaneous connections.
5555

56-
### getWebSockets
56+
### `getWebSockets`
5757

5858
- <code>getWebSockets(tag <Type text="string" /> <MetaInfo text="optional" />)</code>: <Type text="Array<WebSocket>" />
5959

@@ -66,13 +66,13 @@ To learn more about WebSocket Hibernation, refer to [Build a WebSocket server wi
6666
`CLOSING` "readyState". The client might send more messages, so the
6767
WebSocket is technically not disconnected.
6868

69-
### getTags
69+
### `getTags`
7070

7171
- <code>getTags(ws <Type text="WebSocket" />)</code>: <Type text="Array<string>" />
7272

7373
- Returns an Array of tags associated with the given WebSocket. Throws an error if you have not called `state.acceptWebSocket()` on the given WebSocket.
7474

75-
### setWebSocketAutoResponse
75+
### `setWebSocketAutoResponse`
7676

7777
- <code>setWebSocketAutoResponse(webSocketRequestResponsePair{" "}<Type text="WebSocketRequestResponsePair" /> <MetaInfo text="optional" />)</code>: <Type text="void" />
7878

@@ -86,21 +86,21 @@ To learn more about WebSocket Hibernation, refer to [Build a WebSocket server wi
8686

8787
- If `state.setWebSocketAutoResponse()` is set without any argument, it will remove any previously set auto-response configuration. Setting `state.setWebSocketAutoResponse()` without any argument will stop a Durable Object from replying with `response` for a `request`. It will also stop updating the last timestamp of a `request`, but if there was any auto-response timestamp set, it will remain accessible with `state.getWebSocketAutoResponseTimestamp()`.
8888

89-
### getWebSocketAutoResponse
89+
### `getWebSocketAutoResponse`
9090

9191
- `getWebSocketAutoResponse()`: <Type text='Object | null' />
9292

9393
- Gets the <code>WebSocketRequestResponsePair(request <Type text='string'/>, response <Type text='string'/>)</code> currently set, or `null` if there is none.
9494

9595
- Each <code>WebSocketRequestResponsePair(request <Type text='string'/>, response <Type text='string'/>)</code> Object provides methods for `getRequest()` and `getResponse()`.
9696

97-
### getWebSocketAutoResponseTimestamp
97+
### `getWebSocketAutoResponseTimestamp`
9898

9999
- <code>getWebSocketAutoResponseTimestamp(ws <Type text="WebSocket" />)</code>: <Type text="Date | null" />
100100

101101
- Gets the most recent `Date` when the WebSocket received an auto-response request, or `null` if the given WebSocket never received an auto-response request.
102102

103-
### setHibernatableWebSocketEventTimeout
103+
### `setHibernatableWebSocketEventTimeout`
104104

105105
- <code>setHibernatableWebSocketEventTimeout(timeout <Type text="number" />{" "}<MetaInfo text="optional" />)</code>: <Type text="void" />
106106

@@ -110,15 +110,15 @@ To learn more about WebSocket Hibernation, refer to [Build a WebSocket server wi
110110

111111
- The maximum value of `timeout` is 604,800,000 ms (7 days).
112112

113-
### getHibernatableWebSocketEventTimeout
113+
### `getHibernatableWebSocketEventTimeout`
114114

115115
- `getHibernatableWebSocketEventTimeout()`: <Type text='number | null' />
116116

117117
- Gets the currently set hibernatable WebSocket event timeout if any had been set with `state.setHibernatableWebSocketEventTimeout()`.
118118

119119
## Handler Methods
120120

121-
### webSocketMessage
121+
### `webSocketMessage`
122122

123123
- <code> webSocketMessage(ws <Type text="WebSocket" />, message{" "} <Type text="string | ArrayBuffer" />)</code>: <Type text="void" />
124124

@@ -128,15 +128,15 @@ To learn more about WebSocket Hibernation, refer to [Build a WebSocket server wi
128128

129129
- This method is not called for WebSocket control frames. The system will respond to an incoming [WebSocket protocol ping](https://www.rfc-editor.org/rfc/rfc6455#section-5.5.2) automatically without interrupting hibernation.
130130

131-
### webSocketClose
131+
### `webSocketClose`
132132

133133
- <code> webSocketClose(ws <Type text="WebSocket" />, code <Type text="number" />,reason <Type text="string" />, wasClean <Type text="boolean" />)</code>: <Type text="void" />
134134

135135
- Called by the system when a WebSocket is closed. `wasClean()` is true if the connection closed cleanly, false otherwise.
136136

137137
- This method can be `async`.
138138

139-
### webSocketError
139+
### `webSocketError`
140140

141141
- <code> webSocketError(ws <Type text="WebSocket" />, error <Type text="any" />)</code> : <Type text="void" />
142142

0 commit comments

Comments
 (0)