Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
} else {
assert(reference.nodeId, obj.nodeId);
data = {
referenceTypeId: (resultMask & ResultMask.ReferenceType) ? referenceTypeId : null,
isForward: (resultMask &ResultMask.IsForward) ? isForward : false,
nodeId: obj.nodeId,
browseName: (resultMask & ResultMask.BrowseName) ? coerceQualifiedName(obj.browseName) : null,
displayName: (resultMask & ResultMask.DisplayName) ? coerceLocalizedText(obj.displayName[0]) : null,
nodeClass: (resultMask & ResultMask.NodeClass) ? obj.nodeClass : NodeClass.Unspecified,
typeDefinition: (resultMask & ResultMask.TypeDefinition) ? obj.typeDefinition : null
};
}
if (data.typeDefinition === null) {
data.typeDefinition = NodeId.nullNodeId;
}
const referenceDescription = new ReferenceDescription(data);
return referenceDescription;
}