function createRuleListeners(rule, ruleContext) {
	if (
		!rule ||
		typeof rule !== "object" ||
		typeof rule.create !== "function"
	) {
		throw new TypeError(
			`Error while loading rule '${ruleContext.id}': Rule must be an object with a \`create\` method`,
		);
	}

	try {
		return rule.create(ruleContext);
	} catch (ex) {
		ex.message = `Error while loading rule '${ruleContext.id}': ${ex.message}`;
		throw ex;
	}
}
Runs a rule, and gets its listeners
@param {RuleDefinition} rule A rule object
@param {Context} ruleContext The context that should be passed to the rule
@throws {TypeError} If `rule` is not an object with a `create` method
@throws {any} Any error during the rule's `create`
@returns {Object} A map of selector listeners provided by the rule