File: moduleResolutionPackageIdWithRelativeAndAbsolutePath.js

package info (click to toggle)
node-typescript 4.9.5%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 533,908 kB
  • sloc: javascript: 2,018,330; makefile: 7; sh: 1
file content (44 lines) | stat: -rw-r--r-- 1,309 bytes parent folder | download | duplicates (3)
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/moduleResolutionPackageIdWithRelativeAndAbsolutePath.ts] ////

//// [package.json]
{
    "name": "troublesome-lib",
    "version": "1.17.1"
}
//// [Compactable.d.ts]
import { Option } from './Option';
export class Compactable {
    option: Option;
}
//// [Option.d.ts]
export class Option {
    someProperty: string;
}
//// [app.d.ts]
import { Option } from "troublesome-lib/lib/Option";
export class SharedOption extends Option { }
export const makeSharedOption: () => SharedOption;
//// [index.d.ts]
import { Compactable } from "troublesome-lib/lib/Compactable"; // Including this will resolve Option as relative through the imports of compactable
//// [package.json]
{
    "name": "troublesome-lib",
    "version": "1.17.1"
}
//// [Compactable.d.ts]
import { Option } from './Option';
export class Compactable {
    option: Option;
}
//// [Option.d.ts]
export class Option {
    someProperty: string;
}
//// [app.ts]
import * as t from "anotherLib"; // Include the lib that recursively includes option as relative module resolution in this directory
import { makeSharedOption } from "@shared/lib/app"; // Includes option as module in shared folder but as module in node_modules folder


//// [/project/src/app.js]
"use strict";
exports.__esModule = true;