Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The result of build has some nulls removed #296

Open
kenchan0130 opened this issue Mar 18, 2022 · 0 comments
Open

The result of build has some nulls removed #296

kenchan0130 opened this issue Mar 18, 2022 · 0 comments
Labels
help wanted Extra attention is needed

Comments

@kenchan0130
Copy link

For example,

async findById(id: string) {
return this.firestoreColRef
.doc(id)
.get()
.then(d => (d.exists ? this.extractTFromDocSnap(d) : null));
}
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants