mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Make BaseStore abstract (#1431)
* make BaseStore abstract so that implementers are forced to decide how to store data Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
b64694acda
commit
0f3f5611ba
3 files changed
+27
-23
No files matched your search
@@ -2,17 +2,17 @@ import { BaseStore } from "../common/base-store"
|
||||
import * as path from "path"
|
||||
import { LensExtension } from "./lens-extension"
|
||||
|
||||
export class ExtensionStore<T = any> extends BaseStore<T> {
|
||||
export abstract class ExtensionStore<T> extends BaseStore<T> {
|
||||
protected extension: LensExtension
|
||||
|
||||
async loadExtension(extension: LensExtension) {
|
||||
this.extension = extension
|
||||
await super.load()
|
||||
return super.load()
|
||||
}
|
||||
|
||||
async load() {
|
||||
if (!this.extension) { return }
|
||||
await super.load()
|
||||
return super.load()
|
||||
}
|
||||
|
||||
protected cwd() {
|
||||
|
||||
Reference in new issue
Block a user