File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
packages/firestore/scripts Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -32,15 +32,15 @@ function extractIdentifiersFromNodeAndChildren(
32
32
) ;
33
33
}
34
34
35
+ /** Generates the "d.ts" content for `fileName`. */
35
36
function extractTypeDeclaration ( fileName : string ) : string {
37
+ let result : string ;
36
38
const compilerOptions = { declaration : true , emitDeclarationOnly : true } ;
37
- let dtsSource : string ;
38
39
const host = ts . createCompilerHost ( compilerOptions ) ;
39
- host . writeFile = ( fileName : string , contents : string ) =>
40
- ( dtsSource = contents ) ;
40
+ host . writeFile = ( _ : string , contents : string ) => ( result = contents ) ;
41
41
const program = ts . createProgram ( [ fileName ] , compilerOptions , host ) ;
42
42
program . emit ( ) ;
43
- return dtsSource ! ;
43
+ return result ! ;
44
44
}
45
45
46
46
/**
You can’t perform that action at this time.
0 commit comments