extensions/typescript-language-features/src/utils/dependentRegistration.ts/conditionalRegistration
export function conditionalRegistration(
	conditions: readonly Condition[],
	doRegister: () => vscode.Disposable,
): vscode.Disposable {
	return new ConditionalRegistration(conditions, doRegister);
}