Skip to content

Instantly share code, notes, and snippets.

@kazuooooo
Created February 5, 2022 15:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kazuooooo/847c1b2707336b8df8c63170a926304f to your computer and use it in GitHub Desktop.
Save kazuooooo/847c1b2707336b8df8c63170a926304f to your computer and use it in GitHub Desktop.
import { PiniaPluginContext } from "pinia";
// Plugin
const magicNumPlugin = ({ store }: PiniaPluginContext) => {
store.magicNumber = 5
}
// Typing
declare module 'pinia' {
export interface PiniaCustomProperties {
magicNumber: number
}
export interface DefineStoreOptionsBase<S, Store> {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment