Monorepo/工作区项目中触发TypeScript错误“Type instantiation is excessively deep and possibly infinite”的问题求助
Monorepo/工作区项目中触发TypeScript错误“Type instantiation is excessively deep and possibly infinite”的问题求助
各位好,我在开发monorepo/工作区类型的项目时,碰到了一个挺棘手的TypeScript报错,想请大家帮忙支支招。
我触发的错误提示是:
Type instantiation is excessively deep and possibly infinite
离谱的是,这个错误居然出现在一段看起来完全没毛病的类型代码上,代码如下:
import {DescriptionSchema} from "project/other/package"; export const PlanStepSchema = z.object({ id: z .string() .describe("A unique identifier for the step (e.g., 'create_user_model').
这段代码逻辑很简单,但就是莫名触发了这个和类型实例化深度相关的错误,有没有朋友遇到过类似的情况,或者知道怎么排查解决的?
内容来源于stack exchange
相关产品推荐
相关产品推荐

