Giter Site home page Giter Site logo

Comments (5)

ajafff avatar ajafff commented on May 18, 2024

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.

valera33 avatar valera33 commented on May 18, 2024

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.

ajafff avatar ajafff commented on May 18, 2024

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.

valera33 avatar valera33 commented on May 18, 2024

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.

ajafff avatar ajafff commented on May 18, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.