QueryValue is not accepting undefined only null

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;

Hi @Mike. If you want other fields to be possibly undefined, then you need to specify that.

  class User {
    name?: string;
    [key: string]: QueryValue | undefined;
  
    constructor(name: string) {
      this.name = name
    }
  }

Client.query will never return undefined, and the QueryValue type reflects that.