Skip to content

Commit 4974d00

Browse files
authored
chore: Splitting the index.d.ts file into smaller files (#751)
* Splitting the index.d.ts file into smaller files * Database return type fixed
1 parent 9016954 commit 4974d00

File tree

10 files changed

+5617
-5482
lines changed

10 files changed

+5617
-5482
lines changed

docgen/generate-docs.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const repoPath = path.resolve(`${__dirname}/..`);
2828
// Command-line options.
2929
const { source: sourceFile } = yargs
3030
.option('source', {
31-
default: `${repoPath}/src/index.d.ts`,
31+
default: `${repoPath}/src/*.d.ts`,
3232
describe: 'Typescript source file(s)',
3333
type: 'string'
3434
})
@@ -283,7 +283,7 @@ function addFirestoreTypeAliases() {
283283
let contentBlock = firestoreHeader;
284284
lineReader.on('line', (line) => {
285285
line = line.trim();
286-
if (line.startsWith('export import') && line.indexOf('_firestore.')) {
286+
if (line.startsWith('export import') && line.indexOf('_firestore.') >= 0) {
287287
const typeName = line.split(' ')[2];
288288
if (firestoreExcludes.indexOf(typeName) === -1) {
289289
contentBlock += `

gulpfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ gulp.task('copyDatabase', function() {
107107
});
108108

109109
gulp.task('copyTypings', function() {
110-
return gulp.src('src/index.d.ts')
110+
return gulp.src('src/*.d.ts')
111111
// Add header
112112
.pipe(header(banner))
113113

0 commit comments

Comments
 (0)