Skip to content

Commit

Permalink
Fix create-overloads
Browse files Browse the repository at this point in the history
  • Loading branch information
hsubox76 committed Oct 12, 2022
1 parent e57e102 commit 5848943
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/build/create-overloads.ts
Expand Up @@ -221,6 +221,7 @@ function keepPublicFunctionsTransformer(
undefined,
ts.createNamedImports([
ts.createImportSpecifier(
false,
ts.createIdentifier('FirebaseApp'),
ts.createIdentifier('FirebaseAppCompat')
)
Expand All @@ -236,7 +237,7 @@ function keepPublicFunctionsTransformer(
undefined,
ts.createNamedImports(
Array.from(typesToImport).map(typeName =>
ts.createImportSpecifier(undefined, ts.createIdentifier(typeName))
ts.createImportSpecifier(true, undefined, ts.createIdentifier(typeName))
)
)
),
Expand Down Expand Up @@ -302,7 +303,7 @@ function findTypes(
// include the type if it's not in the excludes list or a builtin type
if (!typesToIgnore.includes(typeName)) {
const symbol = typeCheck.getSymbolAtLocation(node.typeName);
const declaration = symbol?.declarations[0];
const declaration = symbol?.declarations?.[0];

// ignore type parameters.
if (!declaration || !ts.isTypeParameterDeclaration(declaration)) {
Expand Down

0 comments on commit 5848943

Please sign in to comment.