function resolvePotentialEnum(node, type) {
	let value = resolveFullyQuantifiedName(node);

	if ( value.startsWith(type + ".") ) {
		// starts with fully qualified enum name -> cut off name
		value = value.slice(type.length + 1);
		return {
			value: value,
			raw: value
		};
	}
	return undefined;
}
Tries to resolve an ENUM, regardless where it is defined and being destructured.

@param {Node} node
@param {string} type
@returns {{value:any, raw: any} | undefined}