1"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[2405],{31732:(e,i,t)=>{t.r(i),t.d(i,{assets:()=>d,contentTitle:()=>c,default:()=>u,frontMatter:()=>s,metadata:()=>o,toc:()=>a});var r=t(85893),n=t(11151);const s={sidebar_position:3,description:"Merge some dictionaries recursively.",toc_max_heading_level:2},c="merge-dicts",o={id:"reference/utils/merge-dicts",title:"merge-dicts",description:"Merge some dictionaries recursively.",source:"@site/docs/reference/utils/merge-dicts.mdx",sourceDirName:"reference/utils",slug:"/reference/utils/merge-dicts",permalink:"/docs/reference/utils/merge-dicts",draft:!1,unlisted:!1,tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3,description:"Merge some dictionaries recursively.",toc_max_heading_level:2},sidebar:"tutorialSidebar",previous:{title:"add-dicts",permalink:"/docs/reference/utils/add-dicts"},next:{title:"touying-progress",permalink:"/docs/reference/utils/touying-progress"}},d={},a=[{value:"init-dict : <TypeLink></TypeLink>",id:"init-dict",level:3},{value:"..dicts : <TypeLink></TypeLink>",id:"dicts",level:3}];function l(e){const i={a:"a",code:"code",h1:"h1",h3:"h3",p:"p",strong:"strong",...(0,n.a)(),...e.components},{Param:t,Parameters:s,Signature:c,SignatureName:o,SignatureParam:d,SourceLink:a,TypeLink:l}=i;return t||p("Param",!0),s||p("Parameters",!0),c||p("Signature",!0),o||p("SignatureName",!0),d||p("SignatureParam",!0),a||p("SourceLink",!0),l||p("TypeLink",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.h1,{id:"merge-dicts",children:"merge-dicts"}),"\n",(0,r.jsx)(c,{children:(0,r.jsxs)("code",{children:[(0,r.jsx)(o,{children:"merge-dicts"}),"(",(0,r.jsxs)(d,{children:[(0,r.jsx)(i.a,{href:"#init-dict",children:"init-dict"}),", "]}),(0,r.jsx)(d,{children:(0,r.jsx)(i.a,{href:"#dicts",children:"..dicts"})}),")",(0,r.jsx)(a,{href:"https://github.com/touying-typ/touying/blob/main/src/utils.typ#L73"})]})}),"\n",(0,r.jsx)(i.p,{children:"Merge some dictionaries recursively."}),"\n",(0,r.jsxs)(i.p,{children:["Example: ",(0,r.jsx)(i.code,{children:"merge-dicts((a: (b: 1)), (a: (c: 2)))"})," returns ",(0,r.jsx)(i.code,{children:"(a: (b: 1, c: 2))"})]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsxs)(i.h3,{id:"init-dict",children:["init-dict : ",(0,r.jsx)(l,{type:"dictionary"})]}),(0,r.jsx)(t,{children:(0,r.jsx)(i.p,{children:"The initial dictionary to start from."})}),(0,r.jsxs)(i.h3,{id:"dicts",children:["..dicts : ",(0,r.jsx)(l,{type:"array"})]}),(0,r.jsx)(t,{children:(0,r.jsx)(i.p,{children:"Additional dictionaries to merge in order."})})]}),"\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.strong,{children:"Returns:"})," ",(0,r.jsx)(l,{type:"dictionary"})]})]})}function u(e={}){const{wrapper:i}={...(0,n.a)(),...e.components};return i?(0,r.jsx)(i,{...e,children:(0,r.jsx)(l,{...e})}):l(e)}function p(e,i){throw new Error("Expected "+(i?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}},11151:(e,i,t)=>{t.d(i,{Z:()=>o,a:()=>c});var r=t(67294);const n={},s=r.createContext(n);function c(e){const i=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(i):{...i,...e}}),[i,e])}function o(e){let i;return i=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:c(e.components),r.createElement(s.Provider,{value:i},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.