Skip to content

Commit 366d8f1

Browse files
committed
Add a unit test that repros the build failure involving merged declarations
# Conflicts: # build-tests/api-extractor-test-01/dist/index-preview.d.ts # build-tests/api-extractor-test-01/dist/index-public.d.ts
1 parent 8ca9e59 commit 366d8f1

2 files changed

Lines changed: 42 additions & 14 deletions

File tree

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
2+
// See LICENSE in the project root for license information.
3+
4+
/**
5+
* @alpha
6+
*/
7+
export interface IMergedInterfaceReferencee {
8+
}
9+
10+
/**
11+
* IMergedInterface instance 1.
12+
* @alpha
13+
*/
14+
export interface IMergedInterface {
15+
type: string;
16+
reference: IMergedInterfaceReferencee;
17+
}
18+
19+
/**
20+
* IMergedInterface instance 2.
21+
* @alpha
22+
*/
23+
export interface IMergedInterface {
24+
type: string;
25+
reference: IMergedInterfaceReferencee;
26+
}

‎build-tests/api-extractor-test-01/src/index.ts‎

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,6 @@
1212
* @packagedocumentation
1313
*/
1414

15-
/**
16-
* Test the alias-following logic: This class gets aliased twice before being
17-
* exported from the package.
18-
*/
19-
export { ReexportedClass1 as ReexportedClass } from './ReexportedClass1';
20-
2115
/**
2216
* A simple, normal definition
2317
* @public
@@ -86,20 +80,28 @@ export class DecoratorTest {
8680
}
8781
}
8882

89-
export { ForgottenExportConsumer1 } from './ForgottenExportConsumer1';
90-
export { ForgottenExportConsumer2 } from './ForgottenExportConsumer2';
91-
export { ForgottenExportConsumer3 } from './ForgottenExportConsumer3';
92-
93-
export { default as IInterfaceAsDefaultExport } from './IInterfaceAsDefaultExport';
94-
9583
export { default as AbstractClass } from './AbstractClass';
9684
export { default as AbstractClass2, AbstractClass3 } from './AbstractClass2';
9785

86+
export { ClassWithTypeLiterals } from './ClassWithTypeLiterals';
87+
88+
export * from './DeclarationMerging';
89+
9890
export {
9991
DefaultExportEdgeCase,
10092
default as ClassExportedAsDefault
10193
} from './DefaultExportEdgeCase';
10294

103-
export { TypeReferencesInAedoc as _TypeReferencesInAedoc } from './TypeReferencesInAedoc';
95+
export { ForgottenExportConsumer1 } from './ForgottenExportConsumer1';
96+
export { ForgottenExportConsumer2 } from './ForgottenExportConsumer2';
97+
export { ForgottenExportConsumer3 } from './ForgottenExportConsumer3';
10498

105-
export { ClassWithTypeLiterals } from './ClassWithTypeLiterals';
99+
export { default as IInterfaceAsDefaultExport } from './IInterfaceAsDefaultExport';
100+
101+
/**
102+
* Test the alias-following logic: This class gets aliased twice before being
103+
* exported from the package.
104+
*/
105+
export { ReexportedClass1 as ReexportedClass } from './ReexportedClass1';
106+
107+
export { TypeReferencesInAedoc as _TypeReferencesInAedoc } from './TypeReferencesInAedoc';

0 commit comments

Comments
 (0)