// Utilities
import { getCurrentInstance } from "./getCurrentInstance.mjs"; // Types
export function injectSelf(key) {
  let vm = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : getCurrentInstance('injectSelf');
  const {
    provides
  } = vm;
  if (provides && key in provides) {
    // TS doesn't allow symbol as index type
    return provides[key];
  }
  return undefined;
}
//# sourceMappingURL=injectSelf.mjs.map