@type/wicg-file-system-access在使用Typeroot时会断裂5

问题描述 投票:0回答:1

花一些时间来调查问题: 使用 @type/wicg-file-system-access从Typescript 4.9迁移到5.7,当使用Typeroots

库库使用typeversions来为不同的打字稿版本定义不同的键入typeroots忽略了库中的定义。

https://github.com/definitytyped/definityped/blob/master/types/wicg-file-system-acystem-access/package.json, "types": "index", "typesVersions": { "<=5.0": { "*": [ "ts5.0/*" ] } },

{ "compilerOptions": { "typeRoots": ["libs/sdk/types", "node_modules/@types"], "types": [ "node", "typelevel", "react-util-types", "browser-compat", "@types/wicg-file-system-access", "office-js" ], } }
加载打字时不再工作并在加载时会导致错误
    
	

解决问题更改tsconfigthate

typescript types package.json
1个回答
0
投票

© www.soinside.com 2019 - 2025. All rights reserved.