Add base app

This commit is contained in:
2022-04-24 23:12:11 +02:00
commit de8c03f342
33 changed files with 1380 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
import { result } from '../../common/result'
export type Wish = {
name: string
description?: string
link?: string
}
export const createWish = (
name: string,
description?: string,
link?: string
): result.Result<Wish, string> => {
if (typeof name !== 'undefined' && name.length > 0) {
return result.ok({
name,
description,
link,
} as Wish)
}
return result.err(`validation of wish failed via. createWish`)
}