[Core] Complete specs for type service components

Complete specs for type service components, and supporting
classes. WTD-573.
This commit is contained in:
Victor Woeltjen
2014-11-21 18:14:26 -08:00
parent b9b164ab31
commit 84c7f3d71d
5 changed files with 104 additions and 18 deletions

View File

@ -46,9 +46,10 @@ define(
return propertyPath.length > 1 ?
lookupValue(value, propertyPath.slice(1)) :
value;
} else {
return undefined;
}
// Fallback; property path was empty
return undefined;
}
function specifyValue(object, propertyPath, value) {
@ -79,13 +80,9 @@ define(
var property = propertyDefinition.property ||
propertyDefinition.key;
if (property) {
return conversion.toFormValue(
lookupValue(model, property)
);
} else {
return undefined;
}
return property ? conversion.toFormValue(
lookupValue(model, property)
) : undefined;
},
/**
* Set a value associated with this property in
@ -97,11 +94,9 @@ define(
value = conversion.toModelValue(value);
if (property) {
return specifyValue(model, property, value);
} else {
return undefined;
}
return property ?
specifyValue(model, property, value) :
undefined;
},
/**
* Get the raw definition for this property.