Skip to content

Commit c014c87

Browse files
WIP
1 parent 180751f commit c014c87

File tree

4 files changed

+32
-14
lines changed

4 files changed

+32
-14
lines changed

common/api-review/firestore-lite.api.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,16 @@
44
55
```ts
66

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
88
//
99
// @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;
1117
}
1218

1319

packages/firestore/lite-types/index.d.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@
1515
* limitations under the License.
1616
*/
1717

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;
2224
}
2325
export {};

packages/firestore/lite/index.ts

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,22 @@
1515
* limitations under the License.
1616
*/
1717

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;
2434
}
2535

26-
export class B1 extends A1<string> {}
36+
export class BarPublic extends Foo<number> {}

packages/firestore/scripts/prune-dts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ function prunePrivateImports<
151151
sourceFile,
152152
type.expression
153153
);
154-
if (publicSymbol && publicSymbol.name !== currentName) {
154+
if (publicSymbol && publicSymbol.name !== currentName && !!type.typeArguments?.length) {
155155
// If there is a public type that we can refer to, update the import
156156
// statement to refer to the public type.
157157
exportedTypes.push(

0 commit comments

Comments
 (0)