emails is optional in OAuth2Profile, so OAuth2Profile["emails"] returns Array<{ ... }> | undefined.
This causes a compilation error when the compiler option exactOptionalPropertyTypes is set.
node_modules/remix-auth-github/build/index.d.ts(15,18): error TS2430: Interface 'GitHubProfile' incorrectly extends interface 'OAuth2Profile'.
Types of property 'emails' are incompatible.
Type '{ value: string; type?: string; }[] | undefined' is not assignable to type '{ value: string; type?: string; }[]'.
Type 'undefined' is not assignable to type '{ value: string; type?: string; }[]'.
emails is always set, so I think it makes sense to remove the possibility of undefined from the type.
emails
is optional inOAuth2Profile
, soOAuth2Profile["emails"]
returnsArray<{ ... }> | undefined
.This causes a compilation error when the compiler option
exactOptionalPropertyTypes
is set.emails
is always set, so I think it makes sense to remove the possibility ofundefined
from the type.