From bc1083220de2f899306e1e626c5fdf289eec4d9f Mon Sep 17 00:00:00 2001 From: Fabian Meyer <3982806+meyfa@users.noreply.github.com> Date: Sun, 13 Oct 2024 13:03:24 +0200 Subject: [PATCH] fix: Consolidate fetchMensa function type --- src/index.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/index.ts b/src/index.ts index b75ef79..1f9abbf 100644 --- a/src/index.ts +++ b/src/index.ts @@ -17,11 +17,7 @@ function resolveSource (source: 'simplesite' | 'jsonapi' | undefined): 'simplesi } // undefined source: use simplesite -export async function fetchMensa (): Promise -export async function fetchMensa (source: undefined, options?: SimpleSiteOptions): Promise - -// for simplesite, options are indeed optional -export async function fetchMensa (source: 'simplesite', options?: SimpleSiteOptions): Promise +export async function fetchMensa (source?: 'simplesite', options?: SimpleSiteOptions): Promise // for jsonapi, options are mandatory due to auth property export async function fetchMensa (source: 'jsonapi', options: JsonApiOptions): Promise