mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-06 03:22:39 +08:00
add more jsb interface info && fix some types (#14628)
* add jsb interface info * mark TODO workaround * fix type * remove some new ts-expect-error * fix type in strict mode
This commit is contained in:
@@ -477,7 +477,8 @@ class _Deserializer {
|
||||
case 'TypedArrayRef':
|
||||
return this._deserializeTypedArrayViewRef(serialized);
|
||||
default:
|
||||
if (serialized.__type__) { // Typed object (including CCClass)
|
||||
// NOTE: when 'strictNullCheck' is false, TS can't infer serialized as SerializedGeneralTypedObject
|
||||
if ((serialized as unknown as SerializedGeneralTypedObject).__type__) { // Typed object (including CCClass)
|
||||
return this._deserializeTypeTaggedObject(serialized, globalIndex, owner, propName);
|
||||
} else if (!Array.isArray(serialized)) { // Embedded primitive javascript object
|
||||
return this._deserializePlainObject(serialized);
|
||||
|
||||
Reference in New Issue
Block a user