2022-10-18 16:29:01 +00:00
|
|
|
import {Redirect} from './base.js';
|
|
|
|
|
|
|
|
export type SimpleParameters = {
|
|
|
|
target: string;
|
|
|
|
type: 'simple';
|
|
|
|
};
|
|
|
|
|
|
|
|
export class SimpleRedirect extends Redirect<SimpleParameters> {
|
|
|
|
public redirect(): URL {
|
|
|
|
return new URL(this.parameters.target);
|
|
|
|
}
|
2022-10-18 20:00:42 +00:00
|
|
|
|
|
|
|
public get redirectValue(): string {
|
|
|
|
return this.parameters.target;
|
|
|
|
}
|
|
|
|
|
|
|
|
public set redirectValue(value: string) {
|
|
|
|
this.parameters.target = value;
|
|
|
|
}
|
2022-10-18 16:29:01 +00:00
|
|
|
}
|