fireorm icon indicating copy to clipboard operation
fireorm copied to clipboard

The result of build has some nulls removed

Open kenchan0130 opened this issue 2 years ago • 0 comments

For example, https://github.com/wovalle/fireorm/blob/2a98b9adf65a531772f3c88b31cfc1c2eb0baf99/src/BaseFirestoreRepository.ts#L23-L28 method is expected to return Promise<T | null>. However, if you check the yarn build generated lib/src/BaseFirestoreRepository.d.ts, we will see Promise<T>.

This is very unfortunate because it is giving up the benefit of the type itself.

The likely cause is that strictNullChecks has been false.

I tried to build with strictNullChecks set to true, but I got 249 errors and found that I had to change a lot of this library.

Because of this situation, I think it is better to let the owner decide or fix the problem.

kenchan0130 avatar Mar 18 '22 14:03 kenchan0130