refactor(core): deprecate useVueFlow options arg (#1465)

refactor(core): deprecate vueflow options
This commit is contained in:
Braks
2024-06-13 00:04:51 +02:00
parent 798faf1be4
commit 70b39cc78e
2 changed files with 6 additions and 0 deletions
@@ -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 `<VueFlow>` component instead.')
}
return vueFlow
}
+1
View File
@@ -208,6 +208,7 @@ export interface FlowProps {
}
// Todo: Remove in next major version
/** @deprecated use `FlowProps` instead */
export type FlowOptions = FlowProps
export interface FlowEmits {