headplane/app/utils/integration/abstract.ts
2025-02-27 13:42:36 -05:00

15 lines
341 B
TypeScript

export abstract class Integration<T> {
protected context: NonNullable<T>;
constructor(context: T) {
if (!context) {
throw new Error('Missing integration context');
}
this.context = context;
}
abstract isAvailable(): Promise<boolean> | boolean;
abstract onConfigChange(): Promise<void> | void;
abstract get name(): string;
}