All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.lib.util.injectSelf.mjs.map Maven / Gradle / Ivy

{"version":3,"file":"injectSelf.mjs","names":["getCurrentInstance","injectSelf","key","vm","arguments","length","undefined","provides"],"sources":["../../src/util/injectSelf.ts"],"sourcesContent":["// Utilities\nimport { getCurrentInstance } from '@/util/getCurrentInstance'\n\n// Types\nimport type { ComponentInternalInstance, InjectionKey } from 'vue'\n\nexport function injectSelf(key: InjectionKey | string, vm?: ComponentInternalInstance): T | undefined\nexport function injectSelf (key: InjectionKey | string, vm = getCurrentInstance('injectSelf')) {\n  const { provides } = vm\n\n  if (provides && (key as string | symbol) in provides) {\n    // TS doesn't allow symbol as index type\n    return provides[key as string]\n  }\n  return undefined\n}\n"],"mappings":"AAAA;AAAA,SACSA,kBAAkB,oCAE3B;AAIA,OAAO,SAASC,UAAUA,CAAEC,GAA+B,EAAyC;EAAA,IAAvCC,EAAE,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAGJ,kBAAkB,CAAC,YAAY,CAAC;EAChG,MAAM;IAAEO;EAAS,CAAC,GAAGJ,EAAE;EAEvB,IAAII,QAAQ,IAAKL,GAAG,IAAwBK,QAAQ,EAAE;IACpD;IACA,OAAOA,QAAQ,CAACL,GAAG,CAAW;EAChC;EACA,OAAOI,SAAS;AAClB","ignoreList":[]}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy