{"expireTime":9007200821600205000,"key":"gatsby-plugin-mdx-entire-payload-311472794e2a4be4115b3710030e521e-","val":{"mdast":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"The ListSchema is identical in function to ","position":{"start":{"line":2,"column":1,"offset":1},"end":{"line":2,"column":44,"offset":44},"indent":[]}},{"type":"linkReference","identifier":"arrayschema","label":"ArraySchema","referenceType":"shortcut","children":[{"type":"text","value":"ArraySchema","position":{"start":{"line":2,"column":45,"offset":45},"end":{"line":2,"column":56,"offset":56},"indent":[]}}],"position":{"start":{"line":2,"column":44,"offset":44},"end":{"line":2,"column":57,"offset":57},"indent":[]}},{"type":"text","value":" but its shape and merge functions\nwill cast your list to an immutable list. ","position":{"start":{"line":2,"column":57,"offset":57},"end":{"line":3,"column":43,"offset":134},"indent":[1]}},{"type":"emphasis","children":[{"type":"text","value":"This is especially useful when working with immutable \ndata structures as all data creation can be handled by your schema. Just describe the shapes that \nyour apis will return and Enty will automatically construct all of your maps and lists for you.","position":{"start":{"line":3,"column":44,"offset":135},"end":{"line":5,"column":96,"offset":384},"indent":[1,1]}}],"position":{"start":{"line":3,"column":43,"offset":134},"end":{"line":5,"column":97,"offset":385},"indent":[1,1]}}],"position":{"start":{"line":2,"column":1,"offset":1},"end":{"line":5,"column":97,"offset":385},"indent":[1,1,1]}},{"type":"code","lang":"js","meta":null,"value":"function() {\n    return <JSON>{{\n        rad: null,\n        foo: 'asdas', \n        bar: 1231, \n        baz: new Date(), \n        cool: {\n            foo: 1,\n            bar: 2\n        }\n    }}</JSON>\n}","position":{"start":{"line":7,"column":1,"offset":387},"end":{"line":20,"column":4,"offset":598},"indent":[1,1,1,1,1,1,1,1,1,1,1,1,1]}},{"type":"heading","depth":2,"children":[{"type":"text","value":"Params","position":{"start":{"line":22,"column":4,"offset":603},"end":{"line":22,"column":10,"offset":609},"indent":[]}}],"position":{"start":{"line":22,"column":1,"offset":600},"end":{"line":22,"column":10,"offset":609},"indent":[]}},{"type":"code","lang":"js","meta":null,"value":"new ListSchema(\n    shape: StructuralSchema,\n    options?: {\n        create: (entity: A) => B\n    }\n);","position":{"start":{"line":24,"column":1,"offset":611},"end":{"line":31,"column":4,"offset":723},"indent":[1,1,1,1,1,1,1]}},{"type":"heading","depth":3,"children":[{"type":"text","value":"shape","position":{"start":{"line":33,"column":5,"offset":729},"end":{"line":33,"column":10,"offset":734},"indent":[]}}],"position":{"start":{"line":33,"column":1,"offset":725},"end":{"line":33,"column":11,"offset":735},"indent":[]}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"type:","position":{"start":{"line":34,"column":3,"offset":738},"end":{"line":34,"column":8,"offset":743},"indent":[]}}],"position":{"start":{"line":34,"column":1,"offset":736},"end":{"line":34,"column":10,"offset":745},"indent":[]}},{"type":"text","value":" ","position":{"start":{"line":34,"column":10,"offset":745},"end":{"line":34,"column":11,"offset":746},"indent":[]}},{"type":"inlineCode","value":"StructuralSchema","position":{"start":{"line":34,"column":11,"offset":746},"end":{"line":34,"column":29,"offset":764},"indent":[]}},{"type":"text","value":"  ","position":{"start":{"line":34,"column":29,"offset":764},"end":{"line":34,"column":31,"offset":766},"indent":[]}}],"position":{"start":{"line":34,"column":1,"offset":736},"end":{"line":34,"column":31,"offset":766},"indent":[]}},{"type":"paragraph","children":[{"type":"text","value":"A single structural schema that describes what is in this collection.","position":{"start":{"line":36,"column":1,"offset":768},"end":{"line":36,"column":70,"offset":837},"indent":[]}}],"position":{"start":{"line":36,"column":1,"offset":768},"end":{"line":36,"column":70,"offset":837},"indent":[]}},{"type":"code","lang":"js","meta":null,"value":"const person = new EntitySchema('person');\nconst friends = new ListSchema(person);","position":{"start":{"line":38,"column":1,"offset":839},"end":{"line":41,"column":4,"offset":931},"indent":[1,1,1]}},{"type":"heading","depth":3,"children":[{"type":"text","value":"options.shape","position":{"start":{"line":43,"column":5,"offset":937},"end":{"line":43,"column":18,"offset":950},"indent":[]}}],"position":{"start":{"line":43,"column":1,"offset":933},"end":{"line":43,"column":19,"offset":951},"indent":[]}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"type:","position":{"start":{"line":44,"column":3,"offset":954},"end":{"line":44,"column":8,"offset":959},"indent":[]}}],"position":{"start":{"line":44,"column":1,"offset":952},"end":{"line":44,"column":10,"offset":961},"indent":[]}},{"type":"text","value":" ","position":{"start":{"line":44,"column":10,"offset":961},"end":{"line":44,"column":11,"offset":962},"indent":[]}},{"type":"inlineCode","value":"(entity: A) => B","position":{"start":{"line":44,"column":11,"offset":962},"end":{"line":44,"column":29,"offset":980},"indent":[]}},{"type":"break","position":{"start":{"line":44,"column":29,"offset":980},"end":{"line":45,"column":1,"offset":983},"indent":[1]}},{"type":"strong","children":[{"type":"text","value":"default:","position":{"start":{"line":45,"column":3,"offset":985},"end":{"line":45,"column":11,"offset":993},"indent":[]}}],"position":{"start":{"line":45,"column":1,"offset":983},"end":{"line":45,"column":13,"offset":995},"indent":[]}},{"type":"text","value":" ","position":{"start":{"line":45,"column":13,"offset":995},"end":{"line":45,"column":14,"offset":996},"indent":[]}},{"type":"inlineCode","value":"(entity) => Immutable.List(entity)","position":{"start":{"line":45,"column":14,"offset":996},"end":{"line":45,"column":50,"offset":1032},"indent":[]}}],"position":{"start":{"line":44,"column":1,"offset":952},"end":{"line":45,"column":50,"offset":1032},"indent":[1]}},{"type":"heading","depth":3,"children":[{"type":"text","value":"options.merge","position":{"start":{"line":48,"column":5,"offset":1039},"end":{"line":48,"column":18,"offset":1052},"indent":[]}}],"position":{"start":{"line":48,"column":1,"offset":1035},"end":{"line":48,"column":19,"offset":1053},"indent":[]}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"type:","position":{"start":{"line":49,"column":3,"offset":1056},"end":{"line":49,"column":8,"offset":1061},"indent":[]}}],"position":{"start":{"line":49,"column":1,"offset":1054},"end":{"line":49,"column":10,"offset":1063},"indent":[]}},{"type":"text","value":" ","position":{"start":{"line":49,"column":10,"offset":1063},"end":{"line":49,"column":11,"offset":1064},"indent":[]}},{"type":"inlineCode","value":"(previous: A, next: B) => C","position":{"start":{"line":49,"column":11,"offset":1064},"end":{"line":49,"column":40,"offset":1093},"indent":[]}},{"type":"break","position":{"start":{"line":49,"column":40,"offset":1093},"end":{"line":50,"column":1,"offset":1096},"indent":[1]}},{"type":"strong","children":[{"type":"text","value":"default:","position":{"start":{"line":50,"column":3,"offset":1098},"end":{"line":50,"column":11,"offset":1106},"indent":[]}}],"position":{"start":{"line":50,"column":1,"offset":1096},"end":{"line":50,"column":13,"offset":1108},"indent":[]}},{"type":"text","value":" ","position":{"start":{"line":50,"column":13,"offset":1108},"end":{"line":50,"column":14,"offset":1109},"indent":[]}},{"type":"inlineCode","value":"(previous, next) => previous.merge(next)","position":{"start":{"line":50,"column":14,"offset":1109},"end":{"line":50,"column":56,"offset":1151},"indent":[]}}],"position":{"start":{"line":49,"column":1,"offset":1054},"end":{"line":50,"column":56,"offset":1151},"indent":[1]}},{"type":"heading","depth":2,"children":[{"type":"text","value":"Methods","position":{"start":{"line":53,"column":4,"offset":1157},"end":{"line":53,"column":11,"offset":1164},"indent":[]}}],"position":{"start":{"line":53,"column":1,"offset":1154},"end":{"line":53,"column":11,"offset":1164},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"text","value":".normalize()","position":{"start":{"line":55,"column":5,"offset":1170},"end":{"line":55,"column":17,"offset":1182},"indent":[]}}],"position":{"start":{"line":55,"column":1,"offset":1166},"end":{"line":55,"column":17,"offset":1182},"indent":[]}},{"type":"jsx","value":"<Normalize />","position":{"start":{"line":56,"column":1,"offset":1183},"end":{"line":56,"column":14,"offset":1196},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"text","value":".denormalize()","position":{"start":{"line":58,"column":5,"offset":1202},"end":{"line":58,"column":19,"offset":1216},"indent":[]}}],"position":{"start":{"line":58,"column":1,"offset":1198},"end":{"line":58,"column":19,"offset":1216},"indent":[]}},{"type":"jsx","value":"<Denormalize />","position":{"start":{"line":59,"column":1,"offset":1217},"end":{"line":59,"column":16,"offset":1232},"indent":[]}},{"type":"export","value":"export const _frontmatter = {\"id\":\"list-schema\",\"title\":\"List Schema\",\"group\":\"Enty Immutable\"}","position":{"start":{"line":63,"column":1,"offset":1236},"end":{"line":63,"column":96,"offset":1331},"indent":[]}}],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":63,"column":96,"offset":1331}}},"scopeImports":["import React from 'react'"],"scopeIdentifiers":["React"],"body":"function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/* @jsx mdx */\nvar _frontmatter = {\n  \"id\": \"list-schema\",\n  \"title\": \"List Schema\",\n  \"group\": \"Enty Immutable\"\n};\n\nvar makeShortcode = function makeShortcode(name) {\n  return function MDXDefaultShortcode(props) {\n    console.warn(\"Component \" + name + \" was not imported, exported, or provided by MDXProvider as global scope\");\n    return mdx(\"div\", props);\n  };\n};\n\nvar Normalize = makeShortcode(\"Normalize\");\nvar Denormalize = makeShortcode(\"Denormalize\");\nvar layoutProps = {\n  _frontmatter: _frontmatter\n};\nvar MDXLayout = \"wrapper\";\nreturn function MDXContent(_ref) {\n  var components = _ref.components,\n      props = _objectWithoutProperties(_ref, [\"components\"]);\n\n  return mdx(MDXLayout, _extends({}, layoutProps, props, {\n    components: components,\n    mdxType: \"MDXLayout\"\n  }), mdx(\"p\", null, \"The ListSchema is identical in function to \", \"[ArraySchema]\", \" but its shape and merge functions\\nwill cast your list to an immutable list. \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"This is especially useful when working with immutable\\ndata structures as all data creation can be handled by your schema. Just describe the shapes that\\nyour apis will return and Enty will automatically construct all of your maps and lists for you.\")), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {\n    \"className\": \"language-js\"\n  }), \"function() {\\n    return <JSON>{{\\n        rad: null,\\n        foo: 'asdas', \\n        bar: 1231, \\n        baz: new Date(), \\n        cool: {\\n            foo: 1,\\n            bar: 2\\n        }\\n    }}</JSON>\\n}\\n\")), mdx(\"h2\", null, \"Params\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {\n    \"className\": \"language-js\"\n  }), \"new ListSchema(\\n    shape: StructuralSchema,\\n    options?: {\\n        create: (entity: A) => B\\n    }\\n);\\n\")), mdx(\"h3\", null, \"shape\"), mdx(\"p\", null, mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"type:\"), \" \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"StructuralSchema\"), \"  \"), mdx(\"p\", null, \"A single structural schema that describes what is in this collection.\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {\n    \"className\": \"language-js\"\n  }), \"const person = new EntitySchema('person');\\nconst friends = new ListSchema(person);\\n\")), mdx(\"h3\", null, \"options.shape\"), mdx(\"p\", null, mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"type:\"), \" \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"(entity: A) => B\"), mdx(\"br\", {\n    parentName: \"p\"\n  }), \"\\n\", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"default:\"), \" \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"(entity) => Immutable.List(entity)\")), mdx(\"h3\", null, \"options.merge\"), mdx(\"p\", null, mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"type:\"), \" \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"(previous: A, next: B) => C\"), mdx(\"br\", {\n    parentName: \"p\"\n  }), \"\\n\", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"default:\"), \" \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"(previous, next) => previous.merge(next)\")), mdx(\"h2\", null, \"Methods\"), mdx(\"h3\", null, \".normalize()\"), mdx(Normalize, {\n    mdxType: \"Normalize\"\n  }), mdx(\"h3\", null, \".denormalize()\"), mdx(Denormalize, {\n    mdxType: \"Denormalize\"\n  }));\n}\n;\nMDXContent.isMDXComponent = true;","rawMDXOutput":"/* @jsx mdx */\nimport { mdx } from '@mdx-js/react';\n/* @jsx mdx */\n\nexport const _frontmatter = {\n  \"id\": \"list-schema\",\n  \"title\": \"List Schema\",\n  \"group\": \"Enty Immutable\"\n};\nconst makeShortcode = name => function MDXDefaultShortcode(props) {\n  console.warn(\"Component \" + name + \" was not imported, exported, or provided by MDXProvider as global scope\")\n  return <div {...props}/>\n};\nconst Normalize = makeShortcode(\"Normalize\");\nconst Denormalize = makeShortcode(\"Denormalize\");\nconst layoutProps = {\n  _frontmatter\n};\nconst MDXLayout = \"wrapper\"\nexport default function MDXContent({\n  components,\n  ...props\n}) {\n  return <MDXLayout {...layoutProps} {...props} components={components} mdxType=\"MDXLayout\">\n    <p>{`The ListSchema is identical in function to `}{`[ArraySchema]`}{` but its shape and merge functions\nwill cast your list to an immutable list. `}<em parentName=\"p\">{`This is especially useful when working with immutable\ndata structures as all data creation can be handled by your schema. Just describe the shapes that\nyour apis will return and Enty will automatically construct all of your maps and lists for you.`}</em></p>\n    <pre><code parentName=\"pre\" {...{\n        \"className\": \"language-js\"\n      }}>{`function() {\n    return <JSON>{{\n        rad: null,\n        foo: 'asdas', \n        bar: 1231, \n        baz: new Date(), \n        cool: {\n            foo: 1,\n            bar: 2\n        }\n    }}</JSON>\n}\n`}</code></pre>\n    <h2>{`Params`}</h2>\n    <pre><code parentName=\"pre\" {...{\n        \"className\": \"language-js\"\n      }}>{`new ListSchema(\n    shape: StructuralSchema,\n    options?: {\n        create: (entity: A) => B\n    }\n);\n`}</code></pre>\n    <h3>{`shape`}</h3>\n    <p><strong parentName=\"p\">{`type:`}</strong>{` `}<inlineCode parentName=\"p\">{`StructuralSchema`}</inlineCode>{`  `}</p>\n    <p>{`A single structural schema that describes what is in this collection.`}</p>\n    <pre><code parentName=\"pre\" {...{\n        \"className\": \"language-js\"\n      }}>{`const person = new EntitySchema('person');\nconst friends = new ListSchema(person);\n`}</code></pre>\n    <h3>{`options.shape`}</h3>\n    <p><strong parentName=\"p\">{`type:`}</strong>{` `}<inlineCode parentName=\"p\">{`(entity: A) => B`}</inlineCode><br parentName=\"p\"></br>{`\n`}<strong parentName=\"p\">{`default:`}</strong>{` `}<inlineCode parentName=\"p\">{`(entity) => Immutable.List(entity)`}</inlineCode></p>\n    <h3>{`options.merge`}</h3>\n    <p><strong parentName=\"p\">{`type:`}</strong>{` `}<inlineCode parentName=\"p\">{`(previous: A, next: B) => C`}</inlineCode><br parentName=\"p\"></br>{`\n`}<strong parentName=\"p\">{`default:`}</strong>{` `}<inlineCode parentName=\"p\">{`(previous, next) => previous.merge(next)`}</inlineCode></p>\n    <h2>{`Methods`}</h2>\n    <h3>{`.normalize()`}</h3>\n    <Normalize mdxType=\"Normalize\" />\n    <h3>{`.denormalize()`}</h3>\n    <Denormalize mdxType=\"Denormalize\" />\n\n    </MDXLayout>;\n}\n\n;\nMDXContent.isMDXComponent = true;"}}