index.js
function processKeyProperty(propDesc, keyPropContainer) {

	// get the key property descriptor
	const keyPropName = propDesc._keyPropertyName;
	if (!keyPropContainer.hasProperty(keyPropName))
		throw invalidPropDef(
			propDesc, 'key property ' + keyPropName +
				' not found among the target object properties.');
	const keyPropDesc = keyPropContainer.getPropertyDesc(keyPropName);

	// validate the key property type
	if (!keyPropDesc.isScalar() || (keyPropDesc.scalarValueType === 'object'))
		throw invalidPropDef(
			propDesc, 'key property ' + keyPropName +
				' is not suitable to be map key.');

	// set key value type in the map property descriptor
	propDesc._keyValueType = keyPropDesc.scalarValueType;
	if (keyPropDesc.isRef())
		propDesc._keyRefTarget = keyPropDesc.refTarget;
}
function processKeyProperty(propDesc, keyPropContainer) {

	// get the key property descriptor
	const keyPropName = propDesc._keyPropertyName;
	if (!keyPropContainer.hasProperty(keyPropName))
		throw invalidPropDef(
			propDesc, 'key property ' + keyPropName +
				' not found among the target object properties.');
	const keyPropDesc = keyPropContainer.getPropertyDesc(keyPropName);

	// validate the key property type
	if (!keyPropDesc.isScalar() || (keyPropDesc.scalarValueType === 'object'))
		throw invalidPropDef(
			propDesc, 'key property ' + keyPropName +
				' is not suitable to be map key.');

	// set key value type in the map property descriptor
	propDesc._keyValueType = keyPropDesc.scalarValueType;
	if (keyPropDesc.isRef())
		propDesc._keyRefTarget = keyPropDesc.refTarget;
}
function processKeyProperty ( propDesc , keyPropContainer ) { // get the key property descriptor const keyPropName = propDesc . _keyPropertyName ; if ( ! keyPropContainer . hasProperty ( keyPropName ) ) throw invalidPropDef ( propDesc , 'key property ' + keyPropName + ' not found among the target object properties.' ) ; const keyPropDesc = keyPropContainer . getPropertyDesc ( keyPropName ) ; // validate the key property type if ( ! keyPropDesc . isScalar ( ) || ( keyPropDesc . scalarValueType === 'object' ) ) throw invalidPropDef ( propDesc , 'key property ' + keyPropName + ' is not suitable to be map key.' ) ; // set key value type in the map property descriptor propDesc . _keyValueType = keyPropDesc . scalarValueType ; if ( keyPropDesc . isRef ( ) ) propDesc . _keyRefTarget = keyPropDesc . refTarget ; }
Process key property name definition attribute and set the property
descriptor's key property value type and reference target accordingly.

@private
@param {module:x2node-records~PropertyDescriptor} propDesc Map property
descriptor.
@param {module:x2node-records~PropertiesContainer} keyPropContainer Key
property container.
Process key property name definition attribute and set the property descriptor s key property value type and reference target accordingly .