We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 870d5dd commit 210c002Copy full SHA for 210c002
runtime/reference/cli/serve.md
@@ -17,9 +17,14 @@ export default {
17
async fetch(_req) {
18
return new Response("Hello world!");
19
},
20
-};
+} satisfies Deno.ServeDefaultExport;
21
```
22
23
+The `satisfies Deno.ServeDefaultExport` type assertion ensures that your
24
+exported object conforms to the expected interface for Deno's HTTP server. This
25
+provides type safety and better editor autocomplete while allowing you to
26
+maintain the inferred types of your implementation.
27
+
28
You can then run the server using the `deno serve` command:
29
30
```bash
@@ -38,5 +43,5 @@ export default {
38
43
39
44
40
45
41
46
42
47
0 commit comments