extensions/typescript-language-features/web/webServer.ts/start
function start({ args, logger, cancellationToken, serverMode, unknownServerMode, startSession: startServer }: StartInput, platform: string) {
	const syntaxOnly = hasArgument('--syntaxOnly');

	logger.info(`Starting TS Server`);
	logger.info(`Version: Moved from Typescript 5.0.0-dev`);
	logger.info(`Arguments: ${args.join(' ')}`);
	logger.info(`Platform: ${platform} NodeVersion: N/A CaseSensitive: ${ts.sys.useCaseSensitiveFileNames}`);
	logger.info(`ServerMode: ${serverMode} syntaxOnly: ${syntaxOnly} hasUnknownServerMode: ${unknownServerMode}`);

	setStackTraceLimit();

	if ((ts as any).Debug.isDebugging) {
		(ts as any).Debug.enableDebugInfo();
	}

	if ((ts as any).sys.tryEnableSourceMapsForHost && /^development$/i.test((ts as any).sys.getEnvironmentVariable('NODE_ENV'))) {
		(ts as any).sys.tryEnableSourceMapsForHost();
	}

	// Overwrites the current console messages to instead write to
	// the log. This is so that language service plugins which use
	// console.log don't break the message passing between tsserver
	// and the client
	console.log = (...args) => logger.msg(args.length === 1 ? args[0] : args.join(', '), ts.server.Msg.Info);
	console.warn = (...args) => logger.msg(args.length === 1 ? args[0] : args.join(', '), ts.server.Msg.Err);
	console.error = (...args) => logger.msg(args.length === 1 ? args[0] : args.join(', '), ts.server.Msg.Err);

	startServer(
		{
			globalPlugins: findArgumentStringArray('--globalPlugins'),
			pluginProbeLocations: findArgumentStringArray('--pluginProbeLocations'),
			allowLocalPluginLoads: hasArgument('--allowLocalPluginLoads'),
			useSingleInferredProject: hasArgument('--useSingleInferredProject'),
			useInferredProjectPerProjectRoot: hasArgument('--useInferredProjectPerProjectRoot'),
			suppressDiagnosticEvents: hasArgument('--suppressDiagnosticEvents'),
			noGetErrOnBackgroundUpdate: hasArgument('--noGetErrOnBackgroundUpdate'),
			syntaxOnly,
			serverMode
		},
		logger,
		cancellationToken
	);
}