Skip to content

Commit 5848943

Browse files
committed
Fix create-overloads
1 parent e57e102 commit 5848943

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

scripts/build/create-overloads.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ function keepPublicFunctionsTransformer(
221221
undefined,
222222
ts.createNamedImports([
223223
ts.createImportSpecifier(
224+
false,
224225
ts.createIdentifier('FirebaseApp'),
225226
ts.createIdentifier('FirebaseAppCompat')
226227
)
@@ -236,7 +237,7 @@ function keepPublicFunctionsTransformer(
236237
undefined,
237238
ts.createNamedImports(
238239
Array.from(typesToImport).map(typeName =>
239-
ts.createImportSpecifier(undefined, ts.createIdentifier(typeName))
240+
ts.createImportSpecifier(true, undefined, ts.createIdentifier(typeName))
240241
)
241242
)
242243
),
@@ -302,7 +303,7 @@ function findTypes(
302303
// include the type if it's not in the excludes list or a builtin type
303304
if (!typesToIgnore.includes(typeName)) {
304305
const symbol = typeCheck.getSymbolAtLocation(node.typeName);
305-
const declaration = symbol?.declarations[0];
306+
const declaration = symbol?.declarations?.[0];
306307

307308
// ignore type parameters.
308309
if (!declaration || !ts.isTypeParameterDeclaration(declaration)) {

0 commit comments

Comments
 (0)