Vigia

将 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

已删除的导出

importexportkind之前
ts-api-utilsisInputFilesfunction(node: ts.Node): node is ts.InputFiles
ts-api-utilsisUnparsedProloguefunction(node: ts.Node): node is ts.UnparsedPrologue
ts-api-utilsisUnknownLiteralTypefunction(type: ts.Type): type is UnknownLiteralType
ts-api-utilsisUnparsedSourceTextfunction(node: ts.Node): node is ts.UnparsedSourceText
ts-api-utilsisUnparsedSyntheticReferencefunction(node: ts.Node): node is ts.UnparsedSyntheticReference
ts-api-utilsisTransientSymbolLinksFlagSetfunction(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 · typePartsUse {@link typeConstituents} instead.
ts-api-utils · unionTypePartsUse {@link unionConstituents} instead.
ts-api-utils · intersectionTypePartsUse {@link intersectionConstituents} instead.
ts-api-utils · symbolHasReadonlyDeclarationThis 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)
importexportkind
ts-api-utilsCommenttype
ts-api-utilsiterateTokensfunction
ts-api-utilsiterateCommentsfunction
ts-api-utilstypeConstituentsfunction
ts-api-utilsunionConstituentsfunction
ts-api-utilsintersectionConstituentsfunction

常见问题

将 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