question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support Typescript 2's baseUrl setting

See original GitHub issue

Typescript 2 includes a baseUrl option in its tsconfig.json.

This option specifies the base path (relative to tsconfig.json) from which non-relative modules are imported (without conflicting with node_modules and such).

It could be nice for PathIntellisense to support this as well.

Example:

import { MyClass } from 'api/myModule'; // here, api folder is at the root of the project, though we can import it with this syntax from anywhere.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:6
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
kasperektcommented, Oct 3, 2016

@ChristianKohler I think it should display TS2 baseUrl files first, then npm packages.

1reaction
ChristianKohlercommented, Oct 12, 2016

@Elarcis I added a new option “Mapping”. See: https://marketplace.visualstudio.com/items?itemName=christian-kohler.path-intellisense. So you can add a mapping for an “api” folder. What do you think?

Read more comments on GitHub >

github_iconTop Results From Across the Web

baseUrl - TSConfig Option - TypeScript
How to create and type JavaScript variables. TypeScript in 5 minutes. An overview of building a TypeScript web app. TSConfig Options. All the...
Read more >
How to configure `baseUrl` for typescript compiler?
I want to start using TypeScript (1.8, Visual Studio 2015) on this project, and trying to rewrite one of the modules. After rewriting...
Read more >
Adding TypeScript to a React Native for macOS Project
Setting up TypeScript for the React Native codebase will improve code quality and readability by static type checking to verify type safety, ...
Read more >
Restructure with ease thanks to Typescript path mappings
In our tsconfig.json file we first need to set a baseUrl to tell the compiler where the paths are starting from. In our...
Read more >
Express.js req.baseUrl Property - GeeksforGeeks
The req.baseUrl property is the URL path on which a router instance was mounted. The req.baseUrl property is similar to the mount path ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found