Giter Site home page Giter Site logo

Comments (4)

karlhorky avatar karlhorky commented on May 22, 2024 1

Wow, super fast @ikatyang, thanks! I'll upgrade now!

from dts-jest.

karlhorky avatar karlhorky commented on May 22, 2024

Ah, just trying this out, I guess this doesn't allow using snapshots. I guess that means I need to remove my snapshots when upgrading to this.

I suppose this is not super critical, but it would be nice to be able to configure that as well, in case it should test against the snapshot:

// @ts-expect-error @dts-jest:fail:snap

Regarding compatibility, the rest of the line after @ts-ignore or @ts-expect-error is recommended to be used to describe why the error is being suppressed, which seems to fit this use case:

It is recommended practice to have the remainder of the comment following @ts-ignore explain which error is being suppressed.

https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-6.html#suppress-errors-in-ts-files-using--ts-ignore-comments


In case you're open to this, but it would be a feature for later, I can also open a new issue for this.

from dts-jest.

ikatyang avatar ikatyang commented on May 22, 2024

Ah, sorry. I did not explain what the new usage is. Basically, @ts-expect-error is treated as an alias of @dts-jest:fail, which means you could use // @ts-expect-error:snap [description] to replace // @dts-jest:fail:snap [description], and snapshots are still supported for sure.

Let me know if you have any question.

from dts-jest.

karlhorky avatar karlhorky commented on May 22, 2024

Ohh, didn't catch the [flags] in the readme there, sorry! Should have seen that.

Edit: I've opened a quick PR to add an example for that: #390

from dts-jest.

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.