re-nav/source/redirect/simple.ts

13 lines
252 B
TypeScript
Raw Normal View History

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);
}
}