Giter Site home page Giter Site logo

davidgabrichidze / vscode-paths-example Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 14 KB

OBSOLETE! Example for VSCODE: Paths mapping support in TypeScript (Intellisense, Errors and Warnings, Go to Definition)

Home Page: https://github.com/Microsoft/vscode/issues/7226

TypeScript 48.81% JavaScript 42.56% HTML 8.63%

vscode-paths-example's Introduction

vscode-paths-example


#Update

"typescript.tsdk" in User Settings should be configured. After installing [email protected] npm -g typescript@next everything worked fine.


Example for VSCODE: Paths mapping support in TypeScript (Intellisense, Errors and Warnings, Go to Definition) Tracking Issue #7226

This RF is related to TypeScript's Path mappings based module resolution #5039 . The link describes all details how Path mapping works. Please review it.

So here is copy of Example 1 from microsoft/TypeScript#5039

projectRoot
├── folder1
│   └── file1.ts (imports 'folder2/file2')
├── folder2
│   ├── file2.ts (imports './file3')
│   └── file3.ts
└── tsconfig.json

Expected behavior is to support 'folder2/file' imports without Errors & Warnings, list classes of module and support Intellisense - in short: normal behavior, as it would be, if imported using relative paths.

image

export class LocalModuleClass
{
  public title: string = "Title from local-module!!!";
}

TypeScript itself, compiles and builds everything as expected, application works.

Demo app uses angular-cli. Instructions to run app: npm install angular-cli -g npm install ng build ng serve

vscode-paths-example's People

Contributors

davidgabrichidze avatar

Watchers

 avatar

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.