From 8c40917cc2762a498cd2d35a4f4f69b01de3d672 Mon Sep 17 00:00:00 2001 From: rinsuki <428rinsuki+git@gmail.com> Date: Sun, 17 Jun 2018 19:55:39 +0900 Subject: [noImplicitAny: true] src/text --- src/text/parse/elements/title.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/text/parse/elements/title.ts') diff --git a/src/text/parse/elements/title.ts b/src/text/parse/elements/title.ts index 9f4708f5d6..11b3abc61b 100644 --- a/src/text/parse/elements/title.ts +++ b/src/text/parse/elements/title.ts @@ -2,7 +2,13 @@ * Title */ -module.exports = text => { +export type TextElementTitle = { + type: "title" + content: string + title: string +}; + +export default function(text: string) { const match = text.match(/^【(.+?)】\n/); if (!match) return null; const title = match[0]; @@ -10,5 +16,5 @@ module.exports = text => { type: 'title', content: title, title: title.substr(1, title.length - 3) - }; -}; + } as TextElementTitle; +} -- cgit v1.2.3-freya