Comments (5)
You probably made a mistake with the version of tsutils in your issue report (2.7.1 of this library is really old)...
Anyways, that change was intentional. The function was added but only exposed once the corresponding version of TypeScript was officially released.
Unfortunately supporting older versions of TypeScript is a real PITA API-wise. It would require this library to only expose type declarations for the minimum supported TS version. That would prevent adding functions like isImportTypeNode
.
For the time being you can only stay at the older version or use skipLibCheck: true
in your compilerOptions.
An approach I'm currently investigating is splitting the modules by TS-version. You would import tsutils/typeguard/2.8
which contains only functions compatible with TS2.8. Then there would be another module tsutils/typeguard/2.9
that re-exports everything from 2.8 plus adds new functions for TS2.9
I will try to get this into v3.0.0 of this library.
from tsutils.
oh yes,I missed "2" in version problem in very last version : 2.27.2 and 2.27.1 is ok. I will update version on top.
from tsutils.
After looking into it again there are some things wrong here: the change log states the function is available as of 2.26.0 (but it was internal in that release). It was exposed in 2.27.2 ... I totally missed that commit. It should have been a minor version instead. But all of this doesn't fix your problem.
from tsutils.
2.27.1 is working fine, I will use that one then, at least for now... project is pretty large, I cant use skipLibCheck
from tsutils.
This should be fixed in v2.28.0. A guide on how to get compatible declarations is now in the README.
from tsutils.
Related Issues (20)
- feature: hasSuperMethod or isSuperMethodOverride HOT 2
- isValidJsxIdentifier: handle colon as namespace separator
- getJsDoc on EndOfFileToken should return comments usable with TypeChecker HOT 1
- TypeScript as a peerDependency HOT 10
- Bad .d.ts file contents breaking tsc builds
- improve the readme HOT 1
- FIx typescript peer deps
- Add is*Type for newer types such as BigInt and TemplateLiteral? HOT 1
- isPropertyReadonlyInType fails for "interface J extends Readonly<I>"
- tsutils doesn't find typescript in monorepo HOT 1
- make peerDependency on typescript optional HOT 1
- Incorrect result from TSUtils.isTypeAssignableToString/Number
- Help maintaining this project? HOT 3
- `isReadonlyPropertyFromMappedType` throws error when `type.modifiersType` is `undefined`
- no type error when using a default import
- Typescript 5 support? HOT 2
- compile error with `exactOptionalPropertyTypes` compiler option enabled
- Get all identifiers that are typed as `any` in `.js` files.
- Is tsutils no longer maintained? HOT 1
- originalKeywordKind has been deprecated HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tsutils.