vuetify
Version:
Vue Material Component Framework
1 lines • 833 B
Source Map (JSON)
{"version":3,"file":"injectSelf.mjs","names":["getCurrentInstance","injectSelf","key","provides"],"sources":["../../src/util/injectSelf.ts"],"sourcesContent":["import { getCurrentInstance } from '@/util/getCurrentInstance'\nimport type { InjectionKey } from 'vue'\n\nexport function injectSelf<T>(key: InjectionKey<T> | string): T | undefined\nexport function injectSelf (key: InjectionKey<any> | string) {\n const { provides } = getCurrentInstance('injectSelf')\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}\n"],"mappings":"SAASA,kBAAkB;AAI3B,OAAO,SAASC,UAAU,CAAEC,GAA+B,EAAE;EAC3D,MAAM;IAAEC;EAAS,CAAC,GAAGH,kBAAkB,CAAC,YAAY,CAAC;EAErD,IAAIG,QAAQ,IAAKD,GAAG,IAAwBC,QAAQ,EAAE;IACpD;IACA,OAAOA,QAAQ,CAACD,GAAG,CAAW;EAChC;AACF"}