File: pathMappingBasedModuleResolution7_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 (44 lines) | stat: -rw-r--r-- 953 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
35
36
37
38
39
40
41
42
43
44
//// [tests/cases/compiler/pathMappingBasedModuleResolution7_node.ts] ////

//// [file1.ts]
import {x} from "./project/file2";
import {y} from "module3";

declare function use(x: string);
use(x.toFixed());
use(y.toFixed());

//// [file2.ts]
import {a} from "module1";
import {b} from "templates/module2";
import {x as c} from "../file3";
export let x = a + b + c;

//// [index.d.ts]
export let a: number

//// [module2.ts]
export let b: number;

//// [index.d.ts]
export let x: number;

//// [module3.d.ts]
export let y: number;



//// [module2.js]
"use strict";
//// [file2.js]
"use strict";
var module1_1 = require("module1");
var module2_1 = require("templates/module2");
var file3_1 = require("../file3");
exports.x = module1_1.a + module2_1.b + file3_1.x;
//// [file1.js]
"use strict";
var file2_1 = require("./project/file2");
var module3_1 = require("module3");
use(file2_1.x.toFixed());
use(module3_1.y.toFixed());