(object: any)
| 380 | } |
| 381 | |
| 382 | writeRefOrNull(object: any) { |
| 383 | if (object === null || object === undefined) { |
| 384 | this.writer.writeInt8(RefFlags.NullFlag); |
| 385 | return true; |
| 386 | } |
| 387 | if (this.typeResolver.trackingRef) { |
| 388 | const refId = this.refWriter.getWrittenRefId(object); |
| 389 | if (typeof refId === "number") { |
| 390 | this.writer.writeInt8(RefFlags.RefFlag); |
| 391 | this.writer.writeVarUInt32(refId); |
| 392 | return true; |
| 393 | } |
| 394 | this.writer.writeInt8(RefFlags.RefValueFlag); |
| 395 | this.refWriter.writeRef(object); |
| 396 | return false; |
| 397 | } |
| 398 | this.writer.writeInt8(RefFlags.NotNullValueFlag); |
| 399 | return false; |
| 400 | } |
| 401 | |
| 402 | writeTypeMeta(typeInfo: TypeInfo, bytes: Uint8Array) { |
| 403 | if (typeInfo.dynamicTypeId !== -1) { |
nothing calls this directly
no test coverage detected