Skip to content

Commit dc471e8

Browse files
committed
prettier
1 parent 4160b80 commit dc471e8

File tree

1 file changed

+8
-4
lines changed
  • sites/cheerpx/src/content/docs/12-reference/CheerpX.OverlayDevice

1 file changed

+8
-4
lines changed

sites/cheerpx/src/content/docs/12-reference/CheerpX.OverlayDevice/create.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@ description: Create a writable persistent overlay device on top of another block
55

66
```ts
77
namespace CheerpX {
8-
class OverlayDevice {
9-
static async create(baseDevice: Device, overlayDevice: Device): Promise<OverlayDevice>;
10-
}
8+
class OverlayDevice {
9+
static async create(
10+
baseDevice: Device,
11+
overlayDevice: Device
12+
): Promise<OverlayDevice>;
13+
}
1114
}
1215
```
1316

@@ -37,9 +40,10 @@ const overlayDevice = await CheerpX.OverlayDevice.create(httpDevice, idbDevice);
3740

3841
// Mount the overlay device in the CheerpX environment as an ext2 filesystem
3942
const cx = await CheerpX.Linux.create({
40-
mounts: [{ type: "ext2", path: "/", dev: overlayDevice }],
43+
mounts: [{ type: "ext2", path: "/", dev: overlayDevice }],
4144
});
4245
```
46+
4347
In this example, the `OverlayDevice` provides a writable layer on top of the `HttpBytesDevice` (which serves as a read-only block device for streaming), allowing changes to be stored locally via the `IDBDevice`.
4448

4549
<!-- Add links when rest of the references are added -->

0 commit comments

Comments
 (0)