You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
src/App.tsx(1,40): error TS6133: 'Link' is declared but its value is never read.
src/Layout.tsx(7,3): error TS6133: 'cn' is declared but its value is never read.
src/Layout.tsx(8,3): error TS6133: 'Button' is declared but its value is never read.
src/Layout.tsx(20,3): error TS6133: 'SidebarGroupContent' is declared but its value is never read.
src/Layout.tsx(21,3): error TS6133: 'SidebarGroupLabel' is declared but its value is never read.
src/Layout.tsx(36,24): error TS7031: Binding element 'name' implicitly has an 'any' type.
src/Layout.tsx(36,30): error TS7031: Binding element 'className' implicitly has an 'any' type.
src/Layout.tsx(79,22): error TS7031: Binding element 'app' implicitly has an 'any' type.
src/Layout.tsx(79,27): error TS7031: Binding element 'children' implicitly has an 'any' type.
src/Layout.tsx(101,26): error TS7006: Parameter 'item' implicitly has an 'any' type.
src/Layout.tsx(101,32): error TS7006: Parameter 'idx' implicitly has an 'any' type.
src/Layout.tsx(104,56): error TS7006: Parameter 'child' implicitly has an 'any' type.
越界发现,记录于 #3827 实施期间(核实生成产物 import/声明对应关系时顺手跑了一次 tsc)。#3827 的面是清单声明与版本区间,这一条是生成的 TS 源码本身,故只记录。
事实(对
origin/main@844d17fc9实测)packages/cli/src/utils/app-generator.ts两个生成器都写出这份tsconfig.json:而生成的源码过不了它。把
createTempAppWithRouting生成到一个目录再用它自己的 tsconfig 跑tsc -p tsconfig.json,与模块解析无关的错(即与@object-ui/*是否装上无关的那些)如下:两类:
App.tsx的Link从react-router-dom拿进来但只在Layout.tsx里用;Layout.tsx从@object-ui/components一次拿 24 个名字,其中cn/Button/SidebarGroupContent/SidebarGroupLabel四个没用上。DynamicIcon与AppLayout的 props 解构、以及menu.map/children.map的回调参数都没标类型,在strict下即错。另有
src/theme-provider.tsx用React.ReactNode作类型但只import { createContext, useContext, useEffect, useState } from "react",没有把React作为命名空间引入 —— 模块里引用 UMD 全局命名空间需要allowUmdGlobalAccess,生成的 tsconfig 没开。这条我没能在同一次 tsc 里干净地隔离出来(那次运行里@object-ui/*的类型没解析成功,噪音盖住了),所以标注为待核,不作为已证事实。影响:今天没有东西是红的(故打
finding)objectui dev/serve/build走的是 vite,只转译不做类型检查;生成的tsconfig.json里noEmit: true,而且没有任何命令会去跑它。这份 tsconfig 目前是纯装饰。tsc闸门(packages/cli 的 createTempAppWithRouting 生成的 app import 了未声明的 lucide-react,且其工具链区间落后仓内一到三个 major #3827 给这个包补的是结构性闸门,没有碰类型面),这批错会一次性全部现形。@vitejs/plugin-react ^4.2.1的 peer 结构性无法被vite ^7.3.1满足 #3742 同族:声明了一套严格度却从不执行,等于 declared 而未 enforced。可选方向(不预设结论)
tsc—— 最彻底,也和 packages/cli 的 createTempAppWithRouting 生成的 app import 了未声明的 lucide-react,且其工具链区间落后仓内一到三个 major #3827 刚落的"生成产物用结构性闸门钉住"同取向。noUnusedLocals/ 降strict)。最省事,但这是把 declared 往 enforced 的反方向调,与仓内 contract-first 的取向相反,我不倾向。倾向方向 1;若嫌一次性太大,方向 2 + 隐式 any 单独排队也说得通。
Generated by Claude Code