INNER CODE UNIT · TypeScript
FormattedFieldBuffer
Escape-Technologies/graphman · src/converters.ts:121
class FormattedFieldBuffer {
formattedFields = new Map<string, FormattedField>();
outrospection: Outrospection;
constructor(outrospection: Outrospection) {
this.outrospection = outrospection;
}
formatField(field: ObjectField): FormattedField {
if (this.formattedFields.get(field.name)) {
return this.formattedFields.get(field.name) as FormattedField;
} else {
const formattedField = formatField(field);
this.formattedFields.set(field.name, formattedField);
return formattedField;
}
}
}