Repository: CesiumGS/cesium (language: javascript)

Issue:
Check.typeOf.object prevents property access
### What happened?

After using `Check.typeOf.object` it is not possible to check other properties of the object. 

![Image](https://github.com/user-attachments/assets/a6c0d18d-ee02-4fd0-8411-67b85a958910)

I think `asserts test is Record<string|number|symbol, any>` would be better than `asserts test is object`.  That seems to block out non-objects while allowing access properties. See this [typescript playground](https://www.typescriptlang.org/play/?ssl=19&ssc=2&pln=1&pc=1#code/GYVwdgxgLglg9mABAQwM6oKYCcoHkBGAVhtLgDYAmAFAG7JkgYBcKYAngJSItqY6qI6DDIhgC4RElEQBvAL4AoUJFgJEUDKjyVa9Rk2TsuMhYhTpseSaR1DGHANynRwXcMQBeL4gCsx52ZYGFAgWEjA9JhOZopmEAiocGQYAHRkcADmbowpGlqOzkEhYepYjE6KSuDQ8Ei8lgTE0AByGADu2cysnNzmfFACdiJiiABKJHBYFAA8WlgwYBkAPmAgALb42EuobBtJADTdAHyyiso1anlQrR1DBkayzvU4jVI3nQVmMK5Dnt5+jzMgWCoXCkQw0UQsUQ8TAiWSaUynVymign0QRVBpXKCjkQA).



### Reproduction steps

Add the following code to a typescript project and note the error.

```ts
import {Check} from "cesium";
function validate(config:any){
  Check.typeOf.object("config", config);
  Check.typeOf.number("config.assetId", config.assetId)
}
```

### Sandcastle example

_No response_

### Environment





Discussion / hints:
Thanks for the suggestion @angrycat9000! Interested in opening a PR?
Probably the next time I go copy pasting my comment about why there is an `if(typeof x !== 'object')` statment in the middle of all the `Check.typeOf...` lines

Fix patch:
diff --git a/CHANGES.md b/CHANGES.md
index 968f17f590d..3ad2aff6726 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -7,6 +7,7 @@
 #### Fixes :wrench:
 
 - `QuadtreePrimitive.updateHeights` now converts position to Cartographic before invoking the callback, ensuring compatibility with change introduced by [commit 53889cb](https://github.com/CesiumGS/cesium/commit/53889cb) and preventing unnecessary computation. [#12555](https://github.com/CesiumGS/cesium/pull/12555)
+- `Check.typeOf.object` now asserts `Record<string|number|symbol, any>` intead of `object` to allow property checks after assertion. [#12572](https://github.com/CesiumGS/cesium/issues/12572)
 
 ## 1.128 - 2025-04-01
 
diff --git a/packages/engine/Source/Core/Check.d.ts b/packages/engine/Source/Core/Check.d.ts
index 35635b4dadd..9b9d1009a32 100644
--- a/packages/engine/Source/Core/Check.d.ts
+++ b/packages/engine/Source/Core/Check.d.ts
@@ -38,7 +38,10 @@ const Check: {
      * @param {*} test The value to test
      * @exception {DeveloperError} test must be typeof 'object'
      */
-    object(name: string, test: any): asserts test is object;
+    object(
+      name: string,
+      test: any,
+    ): asserts test is Record<string | number | symbol, any>;
     /**
      * Throws if test is not typeof 'boolean'
      *


Test patch: