File: pathMappingBasedModuleResolution3_node.js

package info (click to toggle)
node-typescript 2.1.5-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 203,952 kB
  • ctags: 52,987
  • sloc: sh: 11; makefile: 5
file content (34 lines) | stat: -rw-r--r-- 822 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
//// [tests/cases/compiler/pathMappingBasedModuleResolution3_node.ts] ////

//// [file1.ts]

// baseUrl set via command line

import {x} from "folder2/file2"
declare function use(a: any): void;
use(x.toExponential());

//// [file2.ts]
import {x as a} from "./file3"  // found with baseurl
import {y as b} from "file4"    // found with fallback
export var x = a + b;

//// [file3.ts]
export var x = 1;

//// [index.d.ts]
export var y: number;

//// [file3.js]
"use strict";
exports.x = 1;
//// [file2.js]
"use strict";
var file3_1 = require("./file3"); // found with baseurl
var file4_1 = require("file4"); // found with fallback
exports.x = file3_1.x + file4_1.y;
//// [file1.js]
// baseUrl set via command line
"use strict";
var file2_1 = require("folder2/file2");
use(file2_1.x.toExponential());