15 lines
347 B
TypeScript
15 lines
347 B
TypeScript
import 'pinia'
|
|
|
|
declare module 'pinia' {
|
|
export interface DefineStoreOptionsBase<S, Store> {
|
|
// 允许在定义 store 时使用 persist 属性
|
|
persist?: boolean | PersistOptions
|
|
}
|
|
}
|
|
|
|
// 定义持久化配置的类型(根据插件实际参数调整)
|
|
interface PersistOptions {
|
|
paths?: string[]
|
|
key?: string
|
|
storage?: Storage
|
|
} |