Targets
// target.ts
import { TargetModule, KeyInfo } from '@refreshly/core';
export class MyServiceTargetModule extends TargetModule {
private options: Omit<MyServiceTargetModule.Options, keyof TargetModule.Options>;
constructor({ prefix, ...options }: MyServiceTargetModule.Options) {
super({ prefix });
this.options = options;
}
get name(): string {
// This is just used as an identifier for logging purposes
return 'my-service';
}
async target(keyInfos: KeyInfo[]): Promise<void> {
// Store the updated keys!
}
}
export namespace MyServiceTargetModule {
export type Options = {
// Define your options here!
} & TargetModule.Options;
}Last updated