Skip to content

Commit 6bef124

Browse files
committed
refactor(types): use unique symbol for ProxyExpression
1 parent de31faa commit 6bef124

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/types.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22
// Proxy 类型系统
33
// ============================================================================
44

5+
declare const ProxyExpression: unique symbol;
6+
57
/**
68
* Proxy Expression 类型标记(用于类型推导)
79
* 这是一个 phantom type,实际运行时是 Proxy 对象
810
*/
911
export type ProxyExpression<T = unknown> = {
10-
readonly __proxyExpression: T;
12+
readonly [ProxyExpression]: T;
1113
};
1214

1315
/**

0 commit comments

Comments
 (0)