pleshevski.ru/modules/work/domain/Work.ts
Dmitriy Pleshevskiy 406429cbb5
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
move works to the module
2023-06-20 16:30:27 +03:00

20 lines
573 B
TypeScript

import { NonEmptyArray } from "../../../global.ts";
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();