@@ -151,6 +151,7 @@ var servicesSources = [
151151 "signatureHelp.ts" ,
152152 "symbolDisplay.ts" ,
153153 "transpile.ts" ,
154+ // Formatting
154155 "formatting/formatting.ts" ,
155156 "formatting/formattingContext.ts" ,
156157 "formatting/formattingRequestKind.ts" ,
@@ -166,36 +167,53 @@ var servicesSources = [
166167 "formatting/rulesMap.ts" ,
167168 "formatting/rulesProvider.ts" ,
168169 "formatting/smartIndenter.ts" ,
169- "formatting/tokenRange.ts"
170+ "formatting/tokenRange.ts" ,
171+ // CodeFixes
172+ "codeFixProvider.ts" ,
173+ "codefixes/fixes.ts" ,
174+ "codefixes/fixExtendsInterfaceBecomesImplements.ts" ,
175+ "codefixes/fixClassIncorrectlyImplementsInterface.ts" ,
176+ "codefixes/fixClassDoesntImplementInheritedAbstractMember.ts" ,
177+ "codefixes/fixClassSuperMustPrecedeThisAccess.ts" ,
178+ "codefixes/fixConstructorForDerivedNeedSuperCall.ts" ,
179+ "codefixes/helpers.ts" ,
180+ "codefixes/importFixes.ts" ,
181+ "codefixes/unusedIdentifierFixes.ts"
170182] . map ( function ( f ) {
171183 return path . join ( servicesDirectory , f ) ;
172184} ) ) ;
173185
174- var serverCoreSources = [
175- "types.d.ts" ,
176- "shared.ts" ,
177- "utilities.ts" ,
178- "scriptVersionCache.ts" ,
179- "typingsCache.ts" ,
180- "scriptInfo.ts" ,
186+ var baseServerCoreSources = [
187+ "builder.ts" ,
188+ "editorServices.ts" ,
181189 "lsHost.ts" ,
182190 "project.ts" ,
183- "editorServices.ts" ,
184191 "protocol.ts" ,
192+ "scriptInfo.ts" ,
193+ "scriptVersionCache.ts" ,
185194 "session.ts" ,
186- "server.ts"
195+ "shared.ts" ,
196+ "types.ts" ,
197+ "typingsCache.ts" ,
198+ "utilities.ts" ,
187199] . map ( function ( f ) {
188200 return path . join ( serverDirectory , f ) ;
189201} ) ;
190202
203+ var serverCoreSources = [
204+ "server.ts"
205+ ] . map ( function ( f ) {
206+ return path . join ( serverDirectory , f ) ;
207+ } ) . concat ( baseServerCoreSources ) ;
208+
191209var cancellationTokenSources = [
192210 "cancellationToken.ts"
193211] . map ( function ( f ) {
194212 return path . join ( cancellationTokenDirectory , f ) ;
195213} ) ;
196214
197215var typingsInstallerSources = [
198- "../types.d. ts" ,
216+ "../types.ts" ,
199217 "../shared.ts" ,
200218 "typingsInstaller.ts" ,
201219 "nodeTypingsInstaller.ts"
@@ -204,20 +222,7 @@ var typingsInstallerSources = [
204222} ) ;
205223
206224var serverSources = serverCoreSources . concat ( servicesSources ) ;
207-
208- var languageServiceLibrarySources = [
209- "protocol.ts" ,
210- "utilities.ts" ,
211- "scriptVersionCache.ts" ,
212- "scriptInfo.ts" ,
213- "lsHost.ts" ,
214- "project.ts" ,
215- "editorServices.ts" ,
216- "session.ts" ,
217-
218- ] . map ( function ( f ) {
219- return path . join ( serverDirectory , f ) ;
220- } ) . concat ( servicesSources ) ;
225+ var languageServiceLibrarySources = baseServerCoreSources . concat ( servicesSources ) ;
221226
222227var harnessCoreSources = [
223228 "harness.ts" ,
@@ -715,7 +720,18 @@ compileFile(
715720 [ builtLocalDirectory , copyright , builtLocalCompiler ] . concat ( languageServiceLibrarySources ) . concat ( libraryTargets ) ,
716721 /*prefixes*/ [ copyright ] ,
717722 /*useBuiltCompiler*/ true ,
718- { noOutFile : false , generateDeclarations : true } ) ;
723+ { noOutFile : false , generateDeclarations : true , stripInternal : true } ,
724+ /*callback*/ function ( ) {
725+ prependFile ( copyright , tsserverLibraryDefinitionFile ) ;
726+
727+ // Appending exports at the end of the server library
728+ var tsserverLibraryDefinitionFileContents =
729+ fs . readFileSync ( tsserverLibraryDefinitionFile ) . toString ( ) +
730+ "\r\nexport = ts;" +
731+ "\r\nexport as namespace ts;" ;
732+
733+ fs . writeFileSync ( tsserverLibraryDefinitionFile , tsserverLibraryDefinitionFileContents ) ;
734+ } ) ;
719735
720736// Local target to build the language service server library
721737desc ( "Builds language service server library" ) ;
0 commit comments