<commit_before>const schema = new Map()

export interface Field {
  field: string,
  label: string,
  component: React.ReactElement<any>,
  props?: Object
}

export interface Meta {
  type: string,
  editorSchema?: Array<Field>,
  name?: string,
}

export function registerEditable(type: string,
  value: Array<Object> | ((editorSchema: Map<string, Field>) => Map<string, Field>)) {
  schema.set(type, value)
}

export function getEditorSchema(meta: Meta): Array<Field> {
  const adapterSchema = meta.editorSchema
  const userDefinedSchema = schema.get(meta.type)
<commit_msg>Change expected type of value in registerEditable<commit_after>const schema = new Map()

export interface Field {
  field: string,
  label: string,
  component: React.ReactElement<any>,
  props?: Object
}

export interface Meta {
  type: string,
  editorSchema?: Array<Field>,
  name?: string,
}

export function registerEditable(
  type: string,
  value: Array<Field> | ((editorSchema: Map<string, Field>) => Map<string, Field>)
) {
  schema.set(type, value)
}

export function getEditorSchema(meta: Meta): Array<Field> {
  const adapterSchema = meta.editorSchema
  const userDefinedSchema = schema.get(meta.type)

{'fraction_non_alphanumeric': 0.12090680100755667, 'fraction_numerical': 0.0, 'mean_word_length': 5.176165803108808, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2959013', 'n_tokens_mistral': 362, 'n_tokens_neox': 363, 'n_words': 103}