File tree Expand file tree Collapse file tree 4 files changed +32
-14
lines changed Expand file tree Collapse file tree 4 files changed +32
-14
lines changed Original file line number Diff line number Diff line change 4
4
5
5
``` ts
6
6
7
- // Warning: (ae-forgotten-export) The symbol "A1 " needs to be exported by the entry point index.d.ts
7
+ // Warning: (ae-forgotten-export) The symbol "Foo " needs to be exported by the entry point index.d.ts
8
8
//
9
9
// @public (undocumented)
10
- export class B1 extends A1 <string > {
10
+ export class BarPublic extends Foo <number > {
11
+ }
12
+
13
+ // @public (undocumented)
14
+ export class FooPublic <T > extends Foo <string > {
15
+ // (undocumented)
16
+ randomData? : T ;
11
17
}
12
18
13
19
Original file line number Diff line number Diff line change 15
15
* limitations under the License.
16
16
*/
17
17
18
- export declare class B1 {
19
- data ?: string ;
20
- foo ( data : string ) : string ;
21
- foo ( data : string ) : string | void ;
18
+ export declare class BarPublic {
19
+ stringOrNumberData ?: number ;
20
+ }
21
+ export declare class FooPublic < T > {
22
+ randomData ?: T ;
23
+ stringOrNumberData ?: string ;
22
24
}
23
25
export { } ;
Original file line number Diff line number Diff line change 15
15
* limitations under the License.
16
16
*/
17
17
18
- class A1 < T > {
19
- // Non-exported class I want to hide
20
- data ?: T ;
21
- foo ( data : T | null ) : T | null ;
22
- foo ( data : T ) : T | void ;
23
- foo ( data : T | null ) : T | null | void { }
18
+ // class A1<T> {
19
+ // // Non-exported class I want to hide
20
+ // data?: T;
21
+ // foo(data: T | null): T | null;
22
+ // foo(data: T): T | void;
23
+ // foo(data: T | null): T | null | void {}
24
+ // }
25
+ //
26
+ // export class B1 extends A1<string> {}
27
+
28
+ class Foo < T > {
29
+ stringOrNumberData ?: T ;
30
+ }
31
+
32
+ export class FooPublic < T > extends Foo < string > {
33
+ randomData ?: T ;
24
34
}
25
35
26
- export class B1 extends A1 < string > { }
36
+ export class BarPublic extends Foo < number > { }
Original file line number Diff line number Diff line change @@ -151,7 +151,7 @@ function prunePrivateImports<
151
151
sourceFile ,
152
152
type . expression
153
153
) ;
154
- if ( publicSymbol && publicSymbol . name !== currentName ) {
154
+ if ( publicSymbol && publicSymbol . name !== currentName && ! ! type . typeArguments ?. length ) {
155
155
// If there is a public type that we can refer to, update the import
156
156
// statement to refer to the public type.
157
157
exportedTypes . push (
You can’t perform that action at this time.
0 commit comments