mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
50 lines
1.4 KiB
Plaintext
50 lines
1.4 KiB
Plaintext
//// [tests/cases/conformance/salsa/constructorFunctions2.ts] ////
|
|
|
|
=== node.d.ts ===
|
|
declare function require(id: string): any;
|
|
>require : Symbol(require, Decl(node.d.ts, 0, 0))
|
|
>id : Symbol(id, Decl(node.d.ts, 0, 25))
|
|
|
|
declare var module: any, exports: any;
|
|
>module : Symbol(module, Decl(node.d.ts, 1, 11))
|
|
>exports : Symbol(exports, Decl(node.d.ts, 1, 24))
|
|
|
|
=== index.js ===
|
|
const A = require("./other");
|
|
>A : Symbol(A, Decl(index.js, 0, 5))
|
|
>require : Symbol(require, Decl(node.d.ts, 0, 0))
|
|
>"./other" : Symbol("./other", Decl(other.js, 0, 0))
|
|
|
|
const a = new A().id;
|
|
>a : Symbol(a, Decl(index.js, 1, 5))
|
|
>A : Symbol(A, Decl(index.js, 0, 5))
|
|
|
|
const B = function() { this.id = 1; }
|
|
>B : Symbol(B, Decl(index.js, 3, 5))
|
|
|
|
B.prototype.m = function() { this.x = 2; }
|
|
>B.prototype : Symbol(Function.prototype, Decl(lib.es5.d.ts, --, --))
|
|
>B : Symbol(B, Decl(index.js, 3, 5))
|
|
>prototype : Symbol(Function.prototype, Decl(lib.es5.d.ts, --, --))
|
|
|
|
const b = new B();
|
|
>b : Symbol(b, Decl(index.js, 5, 5))
|
|
>B : Symbol(B, Decl(index.js, 3, 5))
|
|
|
|
b.id;
|
|
>b : Symbol(b, Decl(index.js, 5, 5))
|
|
|
|
b.x;
|
|
>b : Symbol(b, Decl(index.js, 5, 5))
|
|
|
|
=== other.js ===
|
|
function A() { this.id = 1; }
|
|
>A : Symbol(A, Decl(other.js, 0, 0))
|
|
|
|
module.exports = A;
|
|
>module.exports : Symbol(exports, Decl(other.js, 0, 0))
|
|
>module : Symbol(module, Decl(other.js, 0, 0))
|
|
>exports : Symbol(exports, Decl(other.js, 0, 0))
|
|
>A : Symbol(A, Decl(other.js, 0, 0))
|
|
|