-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This fixes #40155 in a surprisingly small amount of code.
- Loading branch information
Showing
28 changed files
with
273 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
tests/baselines/reference/commonJSImportClassTypeReference.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
//// [tests/cases/conformance/salsa/commonJSImportClassTypeReference.ts] //// | ||
|
||
//// [main.js] | ||
const { K } = require("./mod1"); | ||
/** @param {K} k */ | ||
function f(k) { | ||
k.values() | ||
} | ||
|
||
//// [mod1.js] | ||
class K { | ||
values() { | ||
} | ||
} | ||
exports.K = K; | ||
// export { K } | ||
|
||
|
||
//// [mod1.js] | ||
"use strict"; | ||
var K = /** @class */ (function () { | ||
function K() { | ||
} | ||
K.prototype.values = function () { | ||
}; | ||
return K; | ||
}()); | ||
exports.K = K; | ||
// export { K } | ||
//// [main.js] | ||
"use strict"; | ||
var K = require("./mod1").K; | ||
/** @param {K} k */ | ||
function f(k) { | ||
k.values(); | ||
} | ||
|
||
|
||
//// [mod1.d.ts] | ||
export class K { | ||
values(): void; | ||
} | ||
//// [main.d.ts] | ||
export {}; |
33 changes: 33 additions & 0 deletions
33
tests/baselines/reference/commonJSImportClassTypeReference.symbols
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
=== tests/cases/conformance/salsa/main.js === | ||
const { K } = require("./mod1"); | ||
>K : Symbol(K, Decl(main.js, 0, 7)) | ||
>require : Symbol(require) | ||
>"./mod1" : Symbol("tests/cases/conformance/salsa/mod1", Decl(mod1.js, 0, 0)) | ||
|
||
/** @param {K} k */ | ||
function f(k) { | ||
>f : Symbol(f, Decl(main.js, 0, 32)) | ||
>k : Symbol(k, Decl(main.js, 2, 11)) | ||
|
||
k.values() | ||
>k.values : Symbol(K.values, Decl(mod1.js, 0, 9)) | ||
>k : Symbol(k, Decl(main.js, 2, 11)) | ||
>values : Symbol(K.values, Decl(mod1.js, 0, 9)) | ||
} | ||
|
||
=== tests/cases/conformance/salsa/mod1.js === | ||
class K { | ||
>K : Symbol(K, Decl(mod1.js, 0, 0)) | ||
|
||
values() { | ||
>values : Symbol(K.values, Decl(mod1.js, 0, 9)) | ||
} | ||
} | ||
exports.K = K; | ||
>exports.K : Symbol(K, Decl(mod1.js, 3, 1)) | ||
>exports : Symbol(K, Decl(mod1.js, 3, 1)) | ||
>K : Symbol(K, Decl(mod1.js, 3, 1)) | ||
>K : Symbol(K, Decl(mod1.js, 0, 0)) | ||
|
||
// export { K } | ||
|
36 changes: 36 additions & 0 deletions
36
tests/baselines/reference/commonJSImportClassTypeReference.types
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
=== tests/cases/conformance/salsa/main.js === | ||
const { K } = require("./mod1"); | ||
>K : typeof K | ||
>require("./mod1") : typeof import("tests/cases/conformance/salsa/mod1") | ||
>require : any | ||
>"./mod1" : "./mod1" | ||
|
||
/** @param {K} k */ | ||
function f(k) { | ||
>f : (k: K) => void | ||
>k : K | ||
|
||
k.values() | ||
>k.values() : void | ||
>k.values : () => void | ||
>k : K | ||
>values : () => void | ||
} | ||
|
||
=== tests/cases/conformance/salsa/mod1.js === | ||
class K { | ||
>K : K | ||
|
||
values() { | ||
>values : () => void | ||
} | ||
} | ||
exports.K = K; | ||
>exports.K = K : typeof K | ||
>exports.K : typeof K | ||
>exports : typeof import("tests/cases/conformance/salsa/mod1") | ||
>K : typeof K | ||
>K : typeof K | ||
|
||
// export { K } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 0 additions & 55 deletions
55
tests/baselines/reference/jsDeclarationsImportAliasExposedWithinNamespaceCjs.errors.txt
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.