1 Commits

Author SHA1 Message Date
5072970c91 Add types and validation (#3) 2026-02-08 09:31:58 +00:00
2 changed files with 10 additions and 0 deletions

5
src/types.ts Normal file
View File

@@ -0,0 +1,5 @@
export interface Directive {
text: string;
timestamp?: Date;
source: string;
}

5
src/validate.ts Normal file
View File

@@ -0,0 +1,5 @@
import type { Directive } from "./types";
export function validate(d: Directive): boolean {
return d.text.length > 0 && d.source.length > 0;
}