2016-11-02 15:05:54 +01:00
|
|
|
// Test that importing a file from `node_modules` does not affect calculation of the common source directory.
|
|
|
|
// @noImplicitReferences: true
|
|
|
|
// @moduleResolution: node
|
|
|
|
// @fullEmitPaths: true
|
|
|
|
|
|
|
|
// @filename: /node_modules/foo/index.ts
|
|
|
|
export const x = 0;
|
|
|
|
|
2016-11-03 20:28:19 +01:00
|
|
|
// @filename: /types/bar.d.ts
|
|
|
|
declare module "bar" {
|
|
|
|
export const y = 0;
|
|
|
|
}
|
|
|
|
|
2016-11-02 15:05:54 +01:00
|
|
|
// @filename: /app/index.ts
|
2016-11-03 20:28:19 +01:00
|
|
|
/// <reference path="../types/bar.d.ts"/>
|
2016-11-02 15:05:54 +01:00
|
|
|
import { x } from "foo";
|
2016-11-03 20:28:19 +01:00
|
|
|
import { y } from "bar";
|
|
|
|
x + y;
|
2016-11-02 15:05:54 +01:00
|
|
|
|
|
|
|
// @filename: /app/tsconfig.json
|
|
|
|
{
|
|
|
|
"compilerOptions": {
|
2016-11-03 20:28:19 +01:00
|
|
|
"outDir": "bin",
|
2016-11-07 16:14:47 +01:00
|
|
|
"typeRoots": ["../types"],
|
|
|
|
"sourceMap": true,
|
|
|
|
"mapRoot": "myMapRoot",
|
|
|
|
"sourceRoot": "mySourceRoot",
|
|
|
|
"declaration": true
|
2016-11-02 15:05:54 +01:00
|
|
|
}
|
|
|
|
}
|