From 622c94154839b9c1aba219fbce70f6b6469a04b5 Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Mon, 28 Sep 2020 18:42:41 +0200 Subject: [PATCH] chore: add missing file --- README.md | 2 +- src/deprecated.ts | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 src/deprecated.ts diff --git a/README.md b/README.md index f1f28be6..c57a5f0c 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ import { createPinia } from 'pinia' app.use(createPinia()) ``` -This will also add devtools support. +This will also add devtools support. Some features like time traveling and editing are still not supported because vue-devtools doesn't expose the necessary APIs yet. **NOTE**: this API is still experimental and is currently only used for devtools and SSR but that might change in the future. ### Creating a Store diff --git a/src/deprecated.ts b/src/deprecated.ts new file mode 100644 index 00000000..06791aaf --- /dev/null +++ b/src/deprecated.ts @@ -0,0 +1,8 @@ +import { defineStore } from './store' + +export const createStore = ((options: any) => { + console.warn( + '[🍍]: "createStore" has been deprecated and will be removed on the sable release, use "defineStore" instead.' + ) + return defineStore(options) +}) as typeof defineStore -- 2.47.2