MCPcopy
hub / github.com/Maronato/vue-toastification / createToastInterface

Function createToastInterface

src/index.ts:15–25  ·  view source on GitHub ↗
(
  optionsOrEventBus?: PluginOptions | InstanceType<VueConstructor>,
  Vue = _Vue
)

Source from the content-addressed store, hash-verified

13 Vue?: VueConstructor
14): ReturnType<typeof ToastInterface>;
15function createToastInterface(
16 optionsOrEventBus?: PluginOptions | InstanceType<VueConstructor>,
17 Vue = _Vue
18) {
19 const isVueInstance = (obj: unknown): obj is InstanceType<VueConstructor> =>
20 obj instanceof Vue;
21 if (isVueInstance(optionsOrEventBus)) {
22 return ToastInterface(Vue, { eventBus: optionsOrEventBus }, false);
23 }
24 return ToastInterface(Vue, optionsOrEventBus, true);
25}
26
27const VueToastificationPlugin: PluginFunction<PluginOptions> = (
28 Vue,

Callers 3

index.spec.tsFile · 0.90
VueToastificationPluginFunction · 0.70
plugin.jsFile · 0.50

Calls 2

isVueInstanceFunction · 0.85
ToastInterfaceFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…