Get Angular 2.ts files instead of .d.ts files

When I work with angular2 code, I often need to see an implementation of a class, say a class Router.

If I click on a type Routerin my IDE web buffer, e. d. inside the constructor of another class

export class myClass {
    constructor(private router: Router) {}
    // ...
}

my IDE transfers me to a TypeScript definition file router.d.tsinside my folder node_modules. I want me to take the source file router.tswith the implementation of the class of the router, and not just its definition.

The original file is .tsnot included in the folder structure node_moduleswhen you get angular2 from github via standard package.json is offered in angular2 Quickstart. Currently, I have to search the source code in the official github repository .

Any ideas on how to get files .tsin my folder node_modules/@angularinstead of files .d.ts?

+4
source share
1 answer

, , TS. , , angular, . , .

NPM .ts, angular. .ts NPM.

, @internal, API, / API, , angular .

, , import { PromiseCompleter } from 'angular2/src/facade/lang'; ( RC0), , RC0. , , ... angular PR.

angular , API .ts d.ts, , . (public_api_guard)

: d.ts .

git , , , , . , angular, , .

, , , angular core .ts , , NPM , TS, , .

, angular, , . , Goto Declaration, -... , ...

+3

Source: https://habr.com/ru/post/1648700/


All Articles