File: importAssertion1%28module%3Dcommonjs%29.js

package info (click to toggle)
node-typescript 5.0.4%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 459,116 kB
  • sloc: javascript: 1,972,754; makefile: 6; sh: 1
file content (92 lines) | stat: -rw-r--r-- 2,513 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
//// [tests/cases/conformance/importAssertion/importAssertion1.ts] ////

//// [0.ts]
export const a = 1;
export const b = 2;

//// [1.ts]
import './0' assert { type: "json" }
import { a, b } from './0' assert { "type": "json" }
import * as foo from './0' assert { type: "json" }
a;
b;
foo.a;
foo.b;

//// [2.ts]
import { a, b } from './0' assert {}
import { a as c, b as d } from './0' assert { a: "a", b: "b", c: "c" }
a;
b;
c;
d;

//// [3.ts]
const a = import('./0')
const b = import('./0', { assert: { type: "json" } })
const c = import('./0', { assert: { type: "json", ttype: "typo" } })
const d = import('./0', { assert: {} })
const dd = import('./0', {})
declare function foo(): any;
const e = import('./0', foo())
const f = import()
const g = import('./0', {}, {})
const h = import('./0', { assert: { type: "json" }},)



//// [0.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.b = exports.a = void 0;
exports.a = 1;
exports.b = 2;
//// [1.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
require("./0");
const _0_1 = require("./0");
const foo = require("./0");
_0_1.a;
_0_1.b;
foo.a;
foo.b;
//// [2.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const _0_1 = require("./0");
const _0_2 = require("./0");
_0_1.a;
_0_1.b;
_0_2.a;
_0_2.b;
//// [3.js]
const a = Promise.resolve().then(() => require('./0'));
const b = Promise.resolve().then(() => require('./0'));
const c = Promise.resolve().then(() => require('./0'));
const d = Promise.resolve().then(() => require('./0'));
const dd = Promise.resolve().then(() => require('./0'));
const e = Promise.resolve().then(() => require('./0'));
const f = Promise.resolve().then(() => require());
const g = Promise.resolve().then(() => require('./0'));
const h = Promise.resolve().then(() => require('./0'));


//// [0.d.ts]
export declare const a = 1;
export declare const b = 2;
//// [1.d.ts]
import './0';
//// [2.d.ts]
export {};
//// [3.d.ts]
declare const a: Promise<typeof import("./0")>;
declare const b: Promise<typeof import("./0")>;
declare const c: Promise<typeof import("./0")>;
declare const d: Promise<typeof import("./0")>;
declare const dd: Promise<typeof import("./0")>;
declare function foo(): any;
declare const e: Promise<typeof import("./0")>;
declare const f: Promise<any>;
declare const g: Promise<typeof import("./0")>;
declare const h: Promise<typeof import("./0")>;