fix some type errors

This commit is contained in:
Thomas Ruoff
2021-02-08 23:18:29 +01:00
parent 78af180567
commit d7478b5e9c
11 changed files with 232 additions and 135 deletions

View File

@@ -1,8 +1,8 @@
function convertLineBreaks(string) {
return string.replace(/\n/g, '\\\\')
function convertLineBreaks(lines: string) {
return lines.replace(/\n/g, '\\\\')
}
export function brief(options) {
export function brief(options: Record<string, string>) {
const {
template = 'brief-fam',
subject = '',

View File

@@ -1,13 +1,13 @@
import path from 'path'
export function getDirPath(id) {
export function getDirPath(id: string) {
return `/tmp/pdfer-${id}`
}
export function getDocPath(id) {
export function getDocPath(id: string) {
return path.join(getDirPath(id), 'doc.tex')
}
export function getPdfPath(id) {
export function getPdfPath(id: string) {
return path.join(getDirPath(id), 'doc.pdf')
}