From 90fd3155ad57efc06c763f45a89ac4668e9be1e3 Mon Sep 17 00:00:00 2001 From: gumi Date: Sat, 9 Jan 2021 19:51:56 +0000 Subject: [ci skip] update the YFM type definition --- src/build.ts | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/build.ts b/src/build.ts index fb90814..772570f 100644 --- a/src/build.ts +++ b/src/build.ts @@ -1,18 +1,21 @@ import { Marked } from "https://deno.land/x/markdown/mod.ts" -// the structure of the front matter +/** references a forum post */ +type ForumEntry = { + forum?: number; + topic?: number; + post: number; +} | number; + +/** the structure of the front matter */ interface PolicyYFM { name: string; description: string; aliases?: string[]; ignore?: boolean; autoupdate?: { - forums?: { - forum?: number; - topic?: number; - post: number; - }; - wiki?: string; + forums?: ForumEntry | ForumEntry[]; + wiki?: string | string[]; }; } -- cgit v1.2.3-70-g09d2