docs: compile the note's type-contract and allowlist examples
The six `ignore-check` fences this note added pushed doc-typecheck's repo-wide opt-out ratio past its 50% ceiling. Two of them were whole compilable units all along: the type-meta declarations only lacked the cordis `Events` import, and the allowlist example compiles as one module once the value and its derived type face sit in the same block. The four that remain are genuine fragments — two interface member signatures, a union arm, and an expression whose operands are declared elsewhere.
This commit is contained in:
@@ -2,5 +2,5 @@
|
||||
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
||||
# after editing either side, bring the other along and re-record with:
|
||||
# pnpm run verify-translation-pairing --write .agents/notes/implemented/architecture/2026-08-10-remote-event-delivery.md
|
||||
2026-08-10-remote-event-delivery.md: 58af845e66e24f49a484ae2cb216e995417a5df5
|
||||
2026-08-10-remote-event-delivery.zh.md: dd96e6082d0eedd541e128b059abaa195a6035a2
|
||||
2026-08-10-remote-event-delivery.md: 81a6805e0f4c46e558784eeebfa51bbcd4b7ad5d
|
||||
2026-08-10-remote-event-delivery.zh.md: 0d901d65b0a9383fa7304925103c075edce4620d
|
||||
@@ -32,7 +32,9 @@ The three **pure passthrough** events ride this path, and their `HostFrame` vari
|
||||
|
||||
type-meta gains one **shape predicate**, one **selection seat**, and **one** member on `TypeRTClientRemote`. No runtime code:
|
||||
|
||||
```ts ignore-check
|
||||
```ts
|
||||
import type { Events } from '@deepseek-ai/cordis'
|
||||
|
||||
/** Cordis events shaped for one-way remote delivery: no Scope binding, void return. */
|
||||
export type TypeRTForwardableEvent = {
|
||||
[Event in keyof Events]: unknown extends ThisParameterType<Events[Event]>
|
||||
@@ -68,7 +70,7 @@ Delivery shares no implementation with the cordis event system: one-way only, no
|
||||
|
||||
`packages/api/remotes/src/remote-events.ts` is listed in the `files` of both `tsconfig.host.json` and `tsconfig.client.json`, and is the allowlist's single home; `src/types.ts` derives its type face:
|
||||
|
||||
```ts ignore-check
|
||||
```ts
|
||||
// remote-events.ts — the value
|
||||
export const API_REMOTE_FORWARDED_EVENTS = [
|
||||
'commands/change',
|
||||
|
||||
@@ -32,7 +32,9 @@ Host 上一族「注册表变了,重新拉一次」的纯失效事件(`comma
|
||||
|
||||
type-meta 加一个**形状谓词**、一个**选择座位**和 `TypeRTClientRemote` 的**一个**成员;零运行时代码:
|
||||
|
||||
```ts ignore-check
|
||||
```ts
|
||||
import type { Events } from '@deepseek-ai/cordis'
|
||||
|
||||
/** Cordis events shaped for one-way remote delivery: no Scope binding, void return. */
|
||||
export type TypeRTForwardableEvent = {
|
||||
[Event in keyof Events]: unknown extends ThisParameterType<Events[Event]>
|
||||
@@ -68,7 +70,7 @@ $dispatch(event: string, args: readonly unknown[]): void
|
||||
|
||||
`packages/api/remotes/src/remote-events.ts` 同时列进 `tsconfig.host.json` 与 `tsconfig.client.json` 的 `files`,是名单的**唯一家**;`src/types.ts` 由它派生类型面:
|
||||
|
||||
```ts ignore-check
|
||||
```ts
|
||||
// remote-events.ts — the value
|
||||
export const API_REMOTE_FORWARDED_EVENTS = [
|
||||
'commands/change',
|
||||
|
||||
Reference in New Issue
Block a user