@@ -55,7 +55,7 @@ class DeclarationsWalker {
5555 if ( declarations ) {
5656 for ( const decl of declarations ) {
5757 const sourceFile = decl . getSourceFile ( ) ;
58- if ( sourceFile === this . protocolFile || / l i b \. ( . * ) \. d .t s / . test ( path . basename ( sourceFile . fileName ) ) ) {
58+ if ( sourceFile === this . protocolFile || / l i b ( \. . + ) ? \. d .t s / . test ( path . basename ( sourceFile . fileName ) ) ) {
5959 return ;
6060 }
6161 if ( decl . kind === ts . SyntaxKind . EnumDeclaration && ! isStringEnum ( decl as ts . EnumDeclaration ) ) {
@@ -121,14 +121,14 @@ class DeclarationsWalker {
121121}
122122
123123function writeProtocolFile ( outputFile : string , protocolTs : string , typeScriptServicesDts : string ) {
124- const options = { target : ts . ScriptTarget . ES5 , declaration : true , noResolve : true , types : < string [ ] > [ ] , stripInternal : true } ;
124+ const options = { target : ts . ScriptTarget . ES5 , declaration : true , noResolve : false , types : < string [ ] > [ ] , stripInternal : true } ;
125125
126126 /**
127127 * 1st pass - generate a program from protocol.ts and typescriptservices.d.ts and emit core version of protocol.d.ts with all internal members stripped
128128 * @return text of protocol.d.t.s
129129 */
130130 function getInitialDtsFileForProtocol ( ) {
131- const program = ts . createProgram ( [ protocolTs , typeScriptServicesDts ] , options ) ;
131+ const program = ts . createProgram ( [ protocolTs , typeScriptServicesDts , path . join ( typeScriptServicesDts , "../lib.es5.d.ts" ) ] , options ) ;
132132
133133 let protocolDts : string | undefined ;
134134 const emitResult = program . emit ( program . getSourceFile ( protocolTs ) , ( file , content ) => {
0 commit comments