Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
422 views
in Technique[技术] by (71.8m points)

angular - Exclude a Specific file to older Typescript version

I am using Angular 11 and i have couple of libraries that are not compiling in TSC 4.0 as those are made specific for older versions. (And I don't have source code for those)

Given this case, I am wondering what can I do force TSC to use older version for this library? Consider following package.json ... I have 3 libraries A, B, C. Typescript compiler complaining about few stuff that have been changed in Latest Typescript version, that was working earlier in 3.8+ ..

If I downgrade from "typescript": "4.0.5", to "typescript": "3.8", or "typescript": "3.9" Angular complains that it needs typescript version 4.0 and above....

"dependencies": {
    "@angular/common": "11.0.5",
    "@angular/compiler": "11.0.5",
    "@angular/core": "11.0.5",
     ... 
     "lib-A": "file:folder-A",
     "lib-B": "file:folder-B",
     "lib-C": "file:folder-C"
}

Any suggestions to tackle this? I don't have source code of any of libraries ... :(


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...