refs.mjs.map 885 B

1
  1. {"version":3,"file":"refs.mjs","names":["onBeforeUpdate","ref","useRefs","refs","value","updateRef","e","i"],"sources":["../../src/composables/refs.ts"],"sourcesContent":["// Utilities\nimport { onBeforeUpdate, ref } from 'vue'\n\n// Types\nimport type { Ref } from 'vue'\n\nexport function useRefs <T extends {}> () {\n const refs = ref<(T | undefined)[]>([]) as Ref<(T | undefined)[]>\n\n onBeforeUpdate(() => (refs.value = []))\n\n function updateRef (e: any, i: number) {\n refs.value[i] = e\n }\n\n return { refs, updateRef }\n}\n"],"mappings":"AAAA;AACA,SAASA,cAAc,EAAEC,GAAG,QAAQ,KAAK;;AAEzC;;AAGA,OAAO,SAASC,OAAOA,CAAA,EAAmB;EACxC,MAAMC,IAAI,GAAGF,GAAG,CAAoB,EAAE,CAA2B;EAEjED,cAAc,CAAC,MAAOG,IAAI,CAACC,KAAK,GAAG,EAAG,CAAC;EAEvC,SAASC,SAASA,CAAEC,CAAM,EAAEC,CAAS,EAAE;IACrCJ,IAAI,CAACC,KAAK,CAACG,CAAC,CAAC,GAAGD,CAAC;EACnB;EAEA,OAAO;IAAEH,IAAI;IAAEE;EAAU,CAAC;AAC5B"}