GithubHelp home page GithubHelp logo

Comments (8)

printjs avatar printjs commented on August 23, 2024 1

Yes,I always use ts-node and tsconfig-paths.This combination works very well.Expecting to become a built-in.Your project is very good.I like it.

from ts-tools.

printjs avatar printjs commented on August 23, 2024

@AviVahl

from ts-tools.

printjs avatar printjs commented on August 23, 2024

#1

from ts-tools.

AviVahl avatar AviVahl commented on August 23, 2024

Thanks for the report. First one! :)

If you also register https://www.npmjs.com/package/tsconfig-paths

Does it work?

from ts-tools.

AviVahl avatar AviVahl commented on August 23, 2024

I'll also think about built-in support without the additional overhead...

from ts-tools.

AviVahl avatar AviVahl commented on August 23, 2024

Just to clarify the current status:

node-typescript-support does not apply any additional processing of the sources (other than transpilation), and thus generated code that relies on mapped "paths" will fail at runtime.

It should be noted that type checking still works (or supposed to work) and report proper type errors, even for types coming out of mapped locations. The generated JS code does not have the paths mapped and fails on Node when running it as-is.

Using node-typescript-support with tsconfig.paths should be possible as well (like using that project with ts-node. You would need to register both.

Built-in support for paths is being considered. If tsconfig.paths works for now, it is on a lower priority than other features or refactors.

from ts-tools.

AviVahl avatar AviVahl commented on August 23, 2024

Fixed in master and will be fixed in the upcoming release of @ts-tools/node.

from ts-tools.

AviVahl avatar AviVahl commented on August 23, 2024

@printjs baseUrl and paths are now supported in @ts-tools/[email protected]. No need for additional external packages.

from ts-tools.

Related Issues (15)

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.