pleshevski.ru/docs/.vuepress/modules/work/domain/Work.ts

21 lines
578 B
TypeScript
Raw Permalink Normal View History

2024-07-24 17:15:05 +03:00
import type { NonEmptyArray } from "../../../global.ts";
2023-06-20 16:30:27 +03:00
import { Role } from "./Role.ts";
import { Status } from "./Status.ts";
import { Technology } from "./Technology.ts";
export interface Work {
name: string;
url: string;
description: string;
roles: NonEmptyArray<Role>;
technologies: NonEmptyArray<Technology>;
startDate: Date;
endDate?: Date;
status?: Status;
}
export const getExternalLink: (work: Pick<Work, "url">) => string = (work) =>
work.url.startsWith("https://")
? work.url
: new URL(work.url, "https://git.pleshevski.ru").toString();