QueryValue is not accepting undefined
, but only null
. This is creating trouble by creating classes with optional props:
class User {
name?: string;
[key: string]: QueryValue;
constructor(name: string) {
this.name = name
}
}
// Property 'name' of type 'string | undefined' is not assignable to 'string' index type 'QueryValue'.ts(2411)
QueryValue:
export type QueryValue = null | string | number | bigint | boolean | QueryValueObject | Array<QueryValue> | DateStub | TimeStub | Module | Document | DocumentReference | NamedDocument | NamedDocumentReference | NullDocument | Page<QueryValue> | EmbeddedSet;