Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
} else if (LIST_TYPES.indexOf(code) !== -1) {
i++;
if (
getTypeCode(typeInfo.subTypes![0].info) ===
SerializationTypeCode.UserDefined
) {
const arrayTypeInfo = typeInfo.subTypes![0];
template = templates.find(x => x.name === arrayTypeInfo.templateName);
if (template == null) {
// Unknown template.
return null;
}
}
} else if (code === SerializationTypeCode.Dictionary) {
i++;
if (
getTypeCode(typeInfo.subTypes![1].info) ===
SerializationTypeCode.UserDefined
) {
const arrayTypeInfo = typeInfo.subTypes![1];
template = templates.find(x => x.name === arrayTypeInfo.templateName);
if (template == null) {
// Unknown template.
return null;
}
}
}
}
return template.name;
i++;
if (i === templatePath.length) {
// Targeting an array but no index yet.
break;
}
if (
getTypeCode(typeInfo.subTypes![0].info) ===
SerializationTypeCode.UserDefined
) {
typeInfo = typeInfo.subTypes![0];
template = oniSave.templates.find(
x => x.name === typeInfo.templateName
);
}
} else if (typeCode === SerializationTypeCode.Dictionary) {
i++;
if (i === templatePath.length) {
// Targeting a dict but no index yet.
break;
}
// Select key or value
i++;
if (i === templatePath.length) {
// Targeting an index, but no key or value.
// Fake a value for the ui.
typeInfo = {
info: SerializationTypeInfo.Pair,
subTypes: typeInfo.subTypes
};
break;
short ? (
[Edit Array]
) : (
);
case SerializationTypeCode.Boolean:
return (props: EditorFieldProps) => ;
case SerializationTypeCode.Byte:
return (props: EditorFieldProps) => (
);
case SerializationTypeCode.Colour:
return (props: EditorFieldProps) => ;
case SerializationTypeCode.Dictionary:
return (props: EditorFieldProps) =>
short ? (
[Edit Dictionary]
) : (
);
case SerializationTypeCode.Double:
return (props: EditorFieldProps) => (
);
case SerializationTypeCode.Enumeration:
return (props: EditorFieldProps) => (
);