vscode-appwrite/src/tree/common/EditableTreeItemBase.ts
Alex Weininger 6cbf15379c
Feature: functions (#15)
* Basic functions create tag and create execution feature

* Detailed function support, create tag still broken

* create tag and pick folder

* edit changelog and bump extension version

* fix linting
2021-05-29 10:32:38 -05:00

13 lines
492 B
TypeScript

import { TreeItem } from "vscode";
export abstract class EditableTreeItemBase<T> extends TreeItem {
public abstract setValue(value: T): Promise<void>;
constructor(contextValuePrefix: string, public readonly value: T, description?: string) {
super(typeof value === "string" ? value : "No label");
this.contextValue = `editable_${contextValuePrefix}`;
this.description = description ?? contextValuePrefix;
}
public abstract prompt(): Promise<void>;
}