fix(chat): standardize public types and docs - #409
Merged
Conversation
Contributor
|
Size Change: +6.88 kB (+1.43%) Total Size: 486 kB 📦 View Changed
ℹ️ View Unchanged
|
@tdesign/web-components
@tdesign/web-components-chat
commit: |
Contributor
|
Size Change: +1.03 kB (+0.12%) Total Size: 881 kB 📦 View Changed
ℹ️ View Unchanged
|
Contributor
TDesign Component Site Preview Open
|
This was referenced Aug 20, 2026
Member
Author
下游联调与发版关注项WebC #409 本轮修改
其他仓库需要处理
最小发版阻断项
|
…ocs' into rss1102/converge-shared-types
RSS1102
marked this pull request as ready for review
August 20, 2026 12:07
uyarn
approved these changes
Aug 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

🤔 这个 PR 的性质是?
🔗 相关 Issue
💡 需求背景和解决方案
本 PR 收敛 WebC 内可确认的 Chat 类型歧义、重复类型、基础组件公共类型边界和发布声明问题。WebC 基础组件保持最小可用,不要求与 React/Vue Props 完全一致,也不把 WebC 基础 Props 搬入
tdesign-common;仅复用 common 已有的框架无关数据类型。需要重点关注的修改
TdChatContentProps和 Action/payload 类型,移除运行时不支持的类型组合;清理重复 Chat 类型、失效文档及深层物理路径转发。ComponentProps;移除与其重复的Td*Props出口。Context、Value、Option、Ref 及没有完整实现对应物的类型继续公开。AffixProps、NotificationProps不再混入实例方法;AffixRef、NotificationInstance仍作为独立公共类型保留。UploadFile/SizeUnit,Watermark 的WatermarkText/WatermarkImage复用 common;WebC 继续拥有组件 Props 和事件适配类型。8.2.2,rolldown-plugin-dts升级至0.28.2;使用preserveEntrySignatures: 'strict'修复MessagePlugin等运行时命名导出丢失。export * from './type'。24 个仅转发类型的基础组件入口统一为export type { Foo } from './type',没有无用途的import type。eslint-disable、Upload 中可证明多余的@ts-ignore和 6 处生产调试日志;没有新增 ESLint/TypeScript ignore。DropdownOption.children改为递归DropdownOption[],开放字段和值对象从any收紧为unknown,实现复用DropdownOption['value']避免重复声明。.d.ts,不发布无法指向包内源码的 declaration map;check:pack校验根入口、组件 subpath、声明引用及关键运行时命名导出。兼容性与风险
main@1.2.10曾通过export *暴露重复的Td*Props。本 PR 不保留 deprecated 别名,用户需将TdButtonProps、TdAffixProps、TdUploadProps等迁移为ButtonProps、AffixProps、UploadProps。AffixProps、NotificationProps读取实例方法的代码需分别改用AffixRef、NotificationInstance。actions: ['searchResult']等运行时不支持的写法不再通过类型检查,应使用handleActions.searchResult或自定义{ name, render }。DropdownOption仍允许自定义字段,但读取未声明字段和值对象属性时由any收紧为unknown,使用方需要先做类型缩小;多级children现在与运行时递归能力一致。22.13.0提升到22.18.0。DatePickerTableCell不再从面板内部模块转发;正式 package exports 原本也不承诺该物理路径。export type ... from ...仅统一源码写法,不改变公共符号;已确认 Vite 8.2.2 + rolldown-plugin-dts 0.28.2 能在发布.d.ts中完整保留类型。tree-v1继续兼容,React 迁移 commontreev2 由独立任务推进。验证结果
pnpm run check:typespnpm test(2/2)pnpm run check:packgit diff --checkReact/Vue 合并前需刷新到 #409 最新
pkg.pr.newtarball,并重新执行完整 CI。📝 更新日志
fix(chat): 收紧与运行时一致的内容和 Action 类型,清理重复声明和文档
refactor(types): 统一组件真实 Props、共享数据类型及显式 type-only 转发
breaking(types): 移除基础组件入口中重复的
Td*Props出口fix(build): 修复发布声明链和 ESM 运行时命名导出丢失
chore(types): 移除可直接修复的 ignore、
any写法和生产调试日志fix(dropdown): 修复递归选项类型并收紧开放字段的
any本条 PR 不需要纳入 Changelog
☑️ 请求合并前的自查清单