re-nav/source/redirect/exports.ts

16 lines
393 B
TypeScript
Raw Normal View History

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