mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-30 01:04:49 -05:00
Don't track private symbol roots in other files during js declaration emit (#55390)
This commit is contained in:
34
tests/cases/compiler/jsDeclarationEmitDoesNotRenameImport.ts
Normal file
34
tests/cases/compiler/jsDeclarationEmitDoesNotRenameImport.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
// @allowJs: true
|
||||
// @declaration: true
|
||||
// @emitDeclarationOnly: true
|
||||
// @strict: false
|
||||
// @strictNullChecks: true
|
||||
// @filename: test/Test.js
|
||||
/** @module test/Test */
|
||||
class Test {}
|
||||
export default Test;
|
||||
// @filename: Test.js
|
||||
/** @module Test */
|
||||
class Test {}
|
||||
export default Test;
|
||||
// @filename: index.js
|
||||
import Test from './test/Test.js'
|
||||
|
||||
/**
|
||||
* @typedef {Object} Options
|
||||
* @property {typeof import("./Test.js").default} [test]
|
||||
*/
|
||||
|
||||
class X extends Test {
|
||||
/**
|
||||
* @param {Options} options
|
||||
*/
|
||||
constructor(options) {
|
||||
super();
|
||||
if (options.test) {
|
||||
this.test = new options.test();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default X;
|
||||
Reference in New Issue
Block a user