This repository was archived by the owner on Nov 21, 2025. It is now read-only.
Commit fee9166
refactor: move notification types to common package
Currently, the notification types in `protocol.ts` are duplicated in both
`client` and `server`.
This commit consolidates them into `common` and create a project reference.
This is done in preparation for the ngcc work, which will add more notification
types.
With this change, `client` and `server` now have to depend on the `.d.ts`
output of `common`.
Although this is the right way to organize the code, it introduces two
unfortunate side effects:
1. `client` and `server` now have to import from `common/out`, since that's
the output directory where the declaration files are emitted.
2. users who clone this repo will have to run `yarn compile` to build the
repo before they can navigate the project in their editor.
(1) does not look "nice", but it offers a straight-forward way without too
drastic changes to the build workflow.
While (2) this is not ideal, it is the correct way of using project references
according to the TS [documentation](https://www.typescriptlang.org/docs/handbook/project-references.html#caveats-for-project-references).
> Because dependent projects make use of .d.ts files that are built from their
> dependencies, you’ll either have to check in certain build outputs or build
> a project after cloning it before you can navigate the project in an editor
> without seeing spurious errors.
TypeScript does plan to improve the ergonomics of project references in the
future.
> We’re working on a behind-the-scenes .d.ts generation process that should be
> able to mitigate this, but for now we recommend informing developers that
> they should build after cloning.1 parent 2a6ecea commit fee9166
File tree
10 files changed
+41
-19
lines changed- client
- src
- common
- scripts
- server
- src
10 files changed
+41
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
1 | 18 | | |
2 | 19 | | |
3 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
14 | 16 | | |
15 | | - | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
6 | 9 | | |
7 | 10 | | |
8 | 11 | | |
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
| 12 | + | |
| 13 | + | |
14 | 14 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
15 | | - | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
8 | 11 | | |
9 | 12 | | |
10 | 13 | | |
| |||
0 commit comments