diff --git a/packages/core/src/composables/useVueFlow.ts b/packages/core/src/composables/useVueFlow.ts index be8765b6..0d60e1ef 100644 --- a/packages/core/src/composables/useVueFlow.ts +++ b/packages/core/src/composables/useVueFlow.ts @@ -18,6 +18,7 @@ type Scope = (EffectScope & { vueFlowId: string }) | undefined * If no store instance is found in context, a new store instance is created and registered in storage * * @public + * @param options - optional options to initialize the store instance * @returns a vue flow store instance */ export function useVueFlow(options?: FlowOptions): VueFlowStore { @@ -125,5 +126,9 @@ export function useVueFlow(options?: FlowOptions): VueFlowStore { scope.vueFlowId = vueFlow.id } + if (options) { + warn('options are deprecated and will be removed in the next major version. Use props on the `` component instead.') + } + return vueFlow } diff --git a/packages/core/src/types/flow.ts b/packages/core/src/types/flow.ts index 11a9695f..1c6b53bc 100644 --- a/packages/core/src/types/flow.ts +++ b/packages/core/src/types/flow.ts @@ -208,6 +208,7 @@ export interface FlowProps { } // Todo: Remove in next major version +/** @deprecated use `FlowProps` instead */ export type FlowOptions = FlowProps export interface FlowEmits {