2022-10-05 17:08:17 +00:00
|
|
|
import {HostnameRedirect} from './hostname.js';
|
|
|
|
|
|
|
|
export * from './base.js';
|
|
|
|
export * from './hostname.js';
|
|
|
|
|
|
|
|
export type Redirects = HostnameRedirect;
|
|
|
|
|
2022-10-12 22:04:51 +00:00
|
|
|
export function parseRedirect<P extends Redirects['parameters']>(
|
2022-10-05 17:08:17 +00:00
|
|
|
parameters: P,
|
|
|
|
): Redirects | undefined {
|
|
|
|
if (parameters.type === 'hostname') {
|
|
|
|
return new HostnameRedirect(parameters);
|
|
|
|
}
|
|
|
|
}
|