Categories
Tags
Ai 生成 best-practices Blogging Caching CLI context CSS Customization Demo development DocC Example extension Fuwari generator grep hooks HTML iOS JavaScript javascript Javascript Linux Markdown Next.js PostCSS progress Promise PWA react React React Hook Form React Query React Router react-native Scheduler security Service Worker SSR state-management suspense TanStack Query TanStack Start tips tsconfig TypeScript typescript Video VS Code vscode Web API Web Development Zod 二叉树 代码组织 任务调度 优先级 入门教程 最佳实践 最小堆 前端 前端开发 可视化 可访问性 命令行 工具链 并发控制 开发教程 开源 异步处理 异步编程 性能优化 手写系列 排序 插件开发 数据结构 数据获取 无限滚动 日历 日志分析 源码分析 状态管理 离线支持 算法 翻译 表单验证 设计模式 语义化 运维 配置
321 words
2 minutes
TSConfig 输出格式化配置
不截断错误信息 - noErrorTruncation
不截断错误消息。
使用默认值 false
时:
var x: { propertyWithAnExceedinglyLongName1: string; propertyWithAnExceedinglyLongName2: string; propertyWithAnExceedinglyLongName3: string; propertyWithAnExceedinglyLongName4: string; propertyWithAnExceedinglyLongName5: string; propertyWithAnExceedinglyLongName6: string; propertyWithAnExceedinglyLongName7: string; propertyWithAnExceedinglyLongName8: string; }; // 'x' 的类型字符串表示在错误消息中会被截断 var s: string = x; // Type '{ propertyWithAnExceedinglyLongName1: string; // propertyWithAnExceedinglyLongName2: string; // propertyWithAnExceedinglyLongName3: string; // propertyWithAnExceedinglyLongName4: string; // propertyWithAnExceedinglyLongName5: string; // propertyWithAnExceedinglyLongName6: string; // propertyWithAnExceedinglyLongName7: string; propert...' is not assignable to type 'string'. // Variable 'x' is used before being assigned.
使用 true
时:
var x: { propertyWithAnExceedinglyLongName1: string; propertyWithAnExceedinglyLongName2: string; propertyWithAnExceedinglyLongName3: string; propertyWithAnExceedinglyLongName4: string; propertyWithAnExceedinglyLongName5: string; propertyWithAnExceedinglyLongName6: string; propertyWithAnExceedinglyLongName7: string; propertyWithAnExceedinglyLongName8: string; }; // 'x' 的类型字符串表示在错误消息中会完整显示 var s: string = x; // Type '{ propertyWithAnExceedinglyLongName1: string; // propertyWithAnExceedinglyLongName2: string; // propertyWithAnExceedinglyLongName3: string; // propertyWithAnExceedinglyLongName4: string; // propertyWithAnExceedinglyLongName5: string; // propertyWithAnExceedinglyLongName6: string; // propertyWithAnExceedinglyLongName7: string; // propertyWithAnExceedinglyLongName8: string; }' is not assignable to type 'string'. // Variable 'x' is used before being assigned.
发布版本:1.0
保留监视输出 - preserveWatchOutput
在监视模式下,是否保留过时的控制台输出,而不是在每次发生更改时清除屏幕。
内部选项
发布版本:2.8
美化输出 - pretty
使用颜色和上下文来美化错误和消息的样式,这是默认启用的 — 让你有机会获得不那么简洁、单一颜色的编译器消息。
默认值:true
发布版本:1.8