mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-15 12:55:51 +00:00
- 删除 cli.tsx 顶部的 globalThis.MACRO / BUILD_* / feature polyfill - 新增 scripts/defines.ts 作为 MACRO define 映射的单一来源 - 新增 scripts/dev.ts,通过 bun run -d 在转译时注入 MACRO 常量 - build.ts 引用 getMacroDefines() 实现构建时内联 - 清理 global.d.ts (移除 BUILD_*, MACRO 函数声明) - 55 个 MACRO 消费文件零改动 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
19 lines
747 B
TypeScript
19 lines
747 B
TypeScript
/**
|
|
* Type declarations for internal Anthropic packages that cannot be installed
|
|
* from public npm. All exports are typed as `any` to suppress errors while
|
|
* still allowing IDE navigation for the actual source code.
|
|
*/
|
|
|
|
// ============================================================================
|
|
// bun:bundle — compile-time macros
|
|
// ============================================================================
|
|
declare module "bun:bundle" {
|
|
export function feature(name: string): boolean;
|
|
}
|
|
|
|
declare module "bun:ffi" {
|
|
export function dlopen<T extends Record<string, { args: readonly string[]; returns: string }>>(path: string, symbols: T): { symbols: { [K in keyof T]: (...args: unknown[]) => unknown }; close(): void };
|
|
}
|
|
|
|
//
|