Code Monkey home page Code Monkey logo

Comments (6)

RyanCavanaugh avatar RyanCavanaugh commented on July 17, 2024 5

Specifying isolatedDeclarations: true only makes sense if you want the errors (that's all the flag does, after all), so we should be evaluating them here. It's the same as specifying verbatimModuleSyntax and noEmit - the latter doesn't affect whether or not the former should do its checks

from typescript.

jakebailey avatar jakebailey commented on July 17, 2024

Debugging, handleNoEmitOptions skips getting declaration diagnostics when noEmit is set. The editor is different and always grabs declaration errors.

Disabling the noEmit skip there fixes the issue, but then has weird knock-on effects. I haven't been able to solve. My test has been pushed to https://github.com/jakebailey/TypeScript/tree/fix-59024 (it doesn't work in a regular compiler test since we always emit).

@sheetalkamat Do you have any ideas as to how to fix this?

from typescript.

sheetalkamat avatar sheetalkamat commented on July 17, 2024

Will take a look.

from typescript.

sheetalkamat avatar sheetalkamat commented on July 17, 2024

This is not a regression. We never reported declaration diagnostics under --noEmit through tsc
If we are changing this it will be need to be not a patch.

from typescript.

jakebailey avatar jakebailey commented on July 17, 2024

Not a regression, no, but I feel like we need to do something here because we're offering up these diagnostics in the editor regardless of noEmit, but then you can get a passing result at the CLI or similar which seems really, really weird?

from typescript.

sheetalkamat avatar sheetalkamat commented on July 17, 2024

These diagnostics are offered when "emitting". Eg if you ran this code with "--noCheck" you will get that error. So its just where the error gets reported. It was modeled so that we are not doing extra pass .. so dts diagnostics are always reported when emitting dts file. (only excpetion is noEmitOnError)

Reference: https://github.com/microsoft/TypeScript/blob/main/tests/baselines/reference/tsc/noCheck/multiFile/dts-errors.js#L35

from typescript.

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.