Skip to content

[TS]updateDoc no longer reject excess member  #7464

@tylim88

Description

@tylim88

Operating System

window 11

Browser Version

Version 114.0.5735.199

Firebase SDK Version

10.0.0

Firebase SDK Product:

Firestore

Describe your project's tooling

Typescript

Describe the problem

updateDoc no longer reject excess member

firebase v9
image

firebase v10
image

Steps and code to reproduce issue

import {
  updateDoc,
  doc,
  getFirestore,
  DocumentReference
} from "firebase/firestore";

type abc = DocumentReference<{
  a: number;
  b: number;
  c: number;
}>;

export const test = () => {
  const docRef = doc(getFirestore(), "abc/efg") as abc;

  updateDoc(docRef, { a: 1, b: 2, c: 3, d: 4 });
};

tsconfig

{
  "compilerOptions": {
    "strict": true,
    "module": "commonjs",
    "jsx": "preserve",
    "esModuleInterop": true,
    "sourceMap": true,
    "allowJs": true,
    "lib": [
      "es6",
      "dom"
    ],
    "rootDir": "src",
    "moduleResolution": "node"
  }
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions