extensions/typescript-language-features/src/languageFeatures/folding.ts/register
export function register(
	selector: DocumentSelector,
	client: ITypeScriptServiceClient,
): vscode.Disposable {
	return conditionalRegistration([
		requireMinVersion(client, TypeScriptFoldingProvider.minVersion),
	], () => {
		return vscode.languages.registerFoldingRangeProvider(selector.syntax,
			new TypeScriptFoldingProvider(client));
	});
}