将 ts-api-utils 从 1.x 升级到 2.x
根据 TypeScript 类型自动比较 ts-api-utils 1.4.3 与 2.5.0 的公开 API。签名变化表示可能存在不兼容变更,并非确定结论。
概要
| 已删除的导入路径 | 0 |
|---|---|
| 已删除的导出 | 6 |
| 已修改的签名 | 3 |
| 已删除的类或接口成员 | 0 |
| 已修改的类或接口成员 | 0 |
| 新增弃用 | 4 |
| 要求变化(engines、peer 依赖) | 2 |
| 新增导出 | 6 |
已删除的导出
| import | export | kind | 之前 |
|---|---|---|---|
ts-api-utils | isInputFiles | function | (node: ts.Node): node is ts.InputFiles |
ts-api-utils | isUnparsedPrologue | function | (node: ts.Node): node is ts.UnparsedPrologue |
ts-api-utils | isUnknownLiteralType | function | (type: ts.Type): type is UnknownLiteralType |
ts-api-utils | isUnparsedSourceText | function | (node: ts.Node): node is ts.UnparsedSourceText |
ts-api-utils | isUnparsedSyntheticReference | function | (node: ts.Node): node is ts.UnparsedSyntheticReference |
ts-api-utils | isTransientSymbolLinksFlagSet | function | (links: ts.TransientSymbolLinks, flag: ts.CheckFlags): boolean |
已修改的签名
| export | 之前 | 之后 |
|---|---|---|
ts-api-utils · typeParts | (type: ts.Type): ts.Type[] | (type: ts.Type): ts.Type[] |
ts-api-utils · unionTypeParts | (type: ts.Type): ts.Type[] | (type: ts.Type): ts.Type[] |
ts-api-utils · intersectionTypeParts | (type: ts.Type): ts.Type[] | (type: ts.Type): ts.Type[] |
已删除的类或接口成员
未发现。
已修改的类或接口成员
未发现。
新增弃用
| export | @deprecated |
|---|---|
ts-api-utils · typeParts | Use {@link typeConstituents} instead. |
ts-api-utils · unionTypeParts | Use {@link unionConstituents} instead. |
ts-api-utils · intersectionTypeParts | Use {@link intersectionConstituents} instead. |
ts-api-utils · symbolHasReadonlyDeclaration | This is not used by any consumers known by ts-api-utils, and so the public export will be removed in a future major version. |
要求变化(engines、peer 依赖)
| 之前 | 之后 | |
|---|---|---|
engines.node | >=16 | >=18.12 |
peerDependencies.typescript | >=4.2.0 | >=4.8.4 |
新增导出 (6)
| import | export | kind |
|---|---|---|
ts-api-utils | Comment | type |
ts-api-utils | iterateTokens | function |
ts-api-utils | iterateComments | function |
ts-api-utils | typeConstituents | function |
ts-api-utils | unionConstituents | function |
ts-api-utils | intersectionConstituents | function |
常见问题
将 ts-api-utils 从 1 升级到 2 有哪些不兼容变更?
在 ts-api-utils 1.4.3 与 2.5.0 之间,Vigia 发现 6 个已删除的导出、3 个已修改的签名,以及 0 个已删除或修改的类或接口成员。
ts-api-utils 2 中弃用了哪些内容?
ts-api-utils 2.5.0 中有 4 个导出或成员新被标记为弃用。
供智能体使用
GET https://vigia.coredls.cloud/v1/packages/npm/ts-api-utils/upgrade?from=1.4.3&to=2.5.0