export function builder()

in tsc/src/args.ts [200:280]


export function builder(yargs: yargs.Argv): yargs.Argv {
	return yargs.
		option('v', {
			alias: 'version',
			description: 'Output the version number',
			boolean: true
		}).
		option('h', {
			alias: 'help',
			description: 'Output usage information',
			boolean: true
		}).
		options('p', {
			alias: 'project',
			description: 'The TypeScript project file',
			string: true
		}).
		option('outputFormat', {
			description: 'Specifies the output format.',
			choices: ['line', 'json'],
			default: 'line'
		}).
		option('id', {
			description: 'Specifies the id format.',
			choices:['number', 'uuid'],
			default: 'number'
		}).
		option('workspaceRoot', {
			description: 'Specifies the root of the workspace. If omitted defaults to the current working directory',
			string: true
		}).
		option('projectName', {
			description: 'Specifies the project name. Defaults to the last directory segment of the tsconfig.json file.',
			string: true
		}).
		option('noContents', {
			description: 'File contents will not be embedded into the dump.',
			boolean: true
		}).
		option('noProjectReferences', {
			description: 'Project references will not be follow and embedded into the dump.',
			boolean: true
		}).
		option('typeAcquisition', {
			description: 'Run automatic type acquisition for JavaScript npm modules.',
			boolean: true
		}).
		option('moniker', {
			description: 'Monikers are use to relate symbols across repositories. In lenient mode the tool will proceed if a moniker was not generated for a visible symbol. In strict mode it will throw an exception.',
			choices: ['strict', 'lenient'],
			default: 'lenient'
		}).
		option('out', {
			description: 'The output file the dump is save to.',
			string: true
		}).
		option('stdout', {
			description: 'Writes the dump to stdout.',
			boolean: true
		}).
		option('package', {
			description: 'The package.json file used to publish the project to npm.',
			string: true
		}).
		option('log', {
			description: 'If provided without a file name then the name of the output file is used with an additional \'.log\' extension.',
			skipValidation: true
		}).
		config('config', 'Specifies a JSON file to read the LSIF configuration from.', (configPath) => {
			try {
				return JSON.parse(stripComments(fs.readFileSync(configPath, { encoding: 'utf8'})));
			} catch (error: any) {
				if (typeof error.message === 'string') {
					console.log(error.message);
				} else {
					console.log(`Can't read config from file ${configPath}.`);
				}
				return { exitCode: -1 };
			}
		});
}