Skip to content

Commit d35ebe9

Browse files
authored
Simplify README by removing unnecessary details
Removed redundant explanation about clean shutdown and request-response in the README.
1 parent 4e43e6a commit d35ebe9

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

README.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ spawn(async () => {
5555
msg.resTx.send(count);
5656
break;
5757
default:
58+
// `unreachable(x: never)` provides compile-time exhaustiveness checking for switch statements
5859
unreachable(msg);
5960
}
6061
}
@@ -69,11 +70,7 @@ await tx.send({ type: "get", resTx });
6970
const value = await resRx;
7071
```
7172

72-
Bounded channels give you backpressure, `for await` gives you clean shutdown on disconnect, and oneshot channels give you typed request-response, all without locks or shared mutable state.
73-
74-
### Exhaustive matching with `unreachable`
75-
76-
The `unreachable(x: never)` function provides compile-time exhaustiveness checking for switch statements. If you add a new variant to `Msg` but forget to handle it, TypeScript will error because the unhandled variant is not assignable to `never`.
73+
Bounded channels give you backpressure, `for await` gives you clean shutdown on disconnect, and oneshot channels give you typed request-response.
7774

7875
## Modules
7976

0 commit comments

Comments
 (0)