LionWeb-io / lionweb-repository

Reference implementation of LionWeb repository
Apache License 2.0
2 stars 1 forks source link

Add check for existence of repository/schema for each request #68

Closed joswarmer closed 1 week ago

joswarmer commented 1 week ago

Add check for each request whether the repository for the request exists. Also activated noFallthroughCasesInSwitch and noImplicitAny TS options, leading to @ts-expect-error for database operations as they always return untypes information.

joswarmer commented 1 week ago

It looks good to me.

I am not 100% sure if it is best to remove the extra check and spare the // @ts-expect-error TS7053 lines or keep it. It is difficult for me to assess which option is best.

Because we get a lot of untyped data from the Postgres queries, I see no other way that using @ts-expect-error. For the rest of the code, the stricter checking does help at other places in the code.