diff --git a/@types/editor-extends.d.ts b/@types/editor-extends.d.ts index 48b89c7c21..73cbc90297 100644 --- a/@types/editor-extends.d.ts +++ b/@types/editor-extends.d.ts @@ -31,6 +31,7 @@ interface EditorExtendsNode { clear(): any; getNode(uuid: string): any; getNodes(): {[uuid: string]: any}; + emit(name: string, ...args: any): void; } interface EditorExtendsPrefabUtils { diff --git a/cocos/2d/assembler/graphics/webgl/impl.ts b/cocos/2d/assembler/graphics/webgl/impl.ts index 098c2c8aab..ba53d4f442 100644 --- a/cocos/2d/assembler/graphics/webgl/impl.ts +++ b/cocos/2d/assembler/graphics/webgl/impl.ts @@ -199,6 +199,7 @@ export class Impl { renderData.initRenderDrawInfo(this._comp, RenderDrawInfoType.MODEL); // TODO: MeshRenderData and RenderData are both sub class of BaseRenderData, here we weirdly use MeshRenderData as RenderData // please fix the type @holycanvas + // issue: https://github.com/cocos/cocos-engine/issues/14637 this._comp._renderData = renderData as unknown as RenderData; this._comp._renderData.material = this._comp.getMaterialInstance(0)!;// hack } diff --git a/cocos/2d/components/ui-mesh-renderer.ts b/cocos/2d/components/ui-mesh-renderer.ts index bd702a8b83..dc21400f5b 100644 --- a/cocos/2d/components/ui-mesh-renderer.ts +++ b/cocos/2d/components/ui-mesh-renderer.ts @@ -181,9 +181,11 @@ export class UIMeshRenderer extends Component { const renderData = MeshRenderData.add(); // TODO: here we weirdly use UIMeshRenderer as UIRenderer // please fix the type @holycanvas + // issue: https://github.com/cocos/cocos-engine/issues/14637 renderData.initRenderDrawInfo(this as unknown as UIRenderer, RenderDrawInfoType.MODEL); // TODO: MeshRenderData and RenderData are both sub class of BaseRenderData, here we weirdly use MeshRenderData as RenderData // please fix the type @holycanvas + // issue: https://github.com/cocos/cocos-engine/issues/14637 this._renderData = renderData as unknown as RenderData; this._renderData.material = this._modelComponent!.getMaterialInstance(index); } diff --git a/cocos/2d/framework/ui-component.ts b/cocos/2d/framework/ui-component.ts index 3c3a90000e..758695ea88 100644 --- a/cocos/2d/framework/ui-component.ts +++ b/cocos/2d/framework/ui-component.ts @@ -47,6 +47,7 @@ export class UIComponent extends Component { public __preload () { // TODO: UIComponent should not be assigned to UIMeshRenderer | UIRenderer @holycanvas // workaround: mark this as any + // issue: https://github.com/cocos/cocos-engine/issues/14637 (this as any).node._uiProps.uiComp = this; } @@ -60,6 +61,7 @@ export class UIComponent extends Component { public onDestroy () { // TODO: UIComponent should not be assigned to UIMeshRenderer | UIRenderer @holycanvas // workaround: mark this as any + // issue: https://github.com/cocos/cocos-engine/issues/14637 if ((this as any).node._uiProps.uiComp === this) { (this as any).node._uiProps.uiComp = null; } diff --git a/cocos/3d/lod/lodgroup-component.ts b/cocos/3d/lod/lodgroup-component.ts index a11d7f51c0..f04691fbab 100644 --- a/cocos/3d/lod/lodgroup-component.ts +++ b/cocos/3d/lod/lodgroup-component.ts @@ -629,9 +629,7 @@ export class LODGroup extends Component { */ private _emitChangeNode (node: Node) { if (EDITOR) { - // TODO: Property 'emit' does not exist on type 'EditorExtendsNode'. - // workaround: mark Node as any - (EditorExtends.Node as any).emit('change', node.uuid, node); + EditorExtends.Node.emit('change', node.uuid, node); } } diff --git a/cocos/3d/skeletal-animation/skeletal-animation-blending.ts b/cocos/3d/skeletal-animation/skeletal-animation-blending.ts index 7e887f5aeb..91905448d2 100644 --- a/cocos/3d/skeletal-animation/skeletal-animation-blending.ts +++ b/cocos/3d/skeletal-animation/skeletal-animation-blending.ts @@ -125,6 +125,7 @@ class BlendStateWriterInternal

implements Runtim } = this; const weight = host.weight; // TODO: please fix type here @Leslie Leigh + // Tracking issue: https://github.com/cocos/cocos-engine/issues/14640 propertyBlendState.blend(value as Readonly & Readonly, weight); } } diff --git a/cocos/animation/animation-curve.ts b/cocos/animation/animation-curve.ts index fb158afc25..6af8613a7d 100644 --- a/cocos/animation/animation-curve.ts +++ b/cocos/animation/animation-curve.ts @@ -318,6 +318,7 @@ const selectLerpFx = (() => { return (from: T, to: T, ratio: number) => { // TODO: `ValueType` class doesn't define lerp method // please fix the type @Leslie Leigh + // Tracking issue: https://github.com/cocos/cocos-engine/issues/14640 (constructor as any).lerp(tempValue, from, to, ratio); return tempValue; }; diff --git a/cocos/animation/cubic-spline-value.ts b/cocos/animation/cubic-spline-value.ts index 40f5fa7e44..9de508f8eb 100644 --- a/cocos/animation/cubic-spline-value.ts +++ b/cocos/animation/cubic-spline-value.ts @@ -89,7 +89,8 @@ function makeCubicSplineValueConstructor ( } } - // TODO: This comparison appears to be unintentional because the types 'new () => T' and 'typeof Quat' have no overlap. + // TODO: This comparison appears to be unintentional because the types 'new () => T' and 'typeof Quat' have no overlap. @Lelie Leight + // Tracking issue: https://github.com/cocos/cocos-engine/issues/14640 if (ConstructorX as any === Quat) { const lerp = CubicSplineValueClass.prototype.lerp; CubicSplineValueClass.prototype.lerp = function (this: CubicSplineValueClass, to: CubicSplineValueClass, t: number, dt: number) { diff --git a/cocos/asset/asset-manager/depend-util.ts b/cocos/asset/asset-manager/depend-util.ts index 88c5caa221..79050f4700 100644 --- a/cocos/asset/asset-manager/depend-util.ts +++ b/cocos/asset/asset-manager/depend-util.ts @@ -181,6 +181,7 @@ export class DependUtil { // TODO: json: any[] is not assigned to IFileData // workaround: mark json as any + // issue: https://github.com/cocos/cocos-engine/issues/14642 if (Array.isArray(json) && (!(BUILD || isCompiledJson(json)) || !hasNativeDep(json as any))) { out = { deps: this._parseDepsFromJson(json), diff --git a/cocos/asset/assets/image-asset.jsb.ts b/cocos/asset/assets/image-asset.jsb.ts index ce4fafaaeb..fa68d4833a 100644 --- a/cocos/asset/assets/image-asset.jsb.ts +++ b/cocos/asset/assets/image-asset.jsb.ts @@ -92,11 +92,9 @@ Object.defineProperty(imageAssetProto, '_nativeAsset', { get () { return this._nativeData; }, - // TODO: Property 'format' does not exist on type 'HTMLCanvasElement' - // set (value: ImageSource) { - set (value: any) { + set (value: ImageSource) { if (!(value instanceof jsbWindow.HTMLElement) && !isImageBitmap(value)) { - value.format = value.format || this.format; + (value as IMemoryImageSource).format = (value as IMemoryImageSource).format || this.format; } this.reset(value); }, diff --git a/cocos/asset/assets/image-asset.ts b/cocos/asset/assets/image-asset.ts index d63132531d..5a9fada546 100644 --- a/cocos/asset/assets/image-asset.ts +++ b/cocos/asset/assets/image-asset.ts @@ -153,7 +153,7 @@ export interface IMemoryImageSource { */ export type ImageSource = HTMLCanvasElement | HTMLImageElement | IMemoryImageSource | ImageBitmap; -function isImageBitmap (imageSource: any): boolean { +function isImageBitmap (imageSource: any): imageSource is ImageBitmap { return !!(sys.hasFeature(sys.Feature.IMAGE_BITMAP) && imageSource instanceof ImageBitmap); } @@ -580,8 +580,7 @@ export class ImageAsset extends Asset { } else if (!(data instanceof HTMLElement)) { // this._nativeData = Object.create(data); this._nativeData = data; - // TODO: Property 'format' does not exist on type 'ImageBitmap' - this._format = (data as any).format; + this._format = data.format; } else { this._nativeData = data; } @@ -593,10 +592,11 @@ export class ImageAsset extends Asset { this._setRawAsset(''); // JSB element should destroy native data. // TODO: Property 'destroy' does not exist on type 'HTMLImageElement'. + // maybe we need a higher level implementation called `pal/image`, we provide `destroy` interface here. + // issue: https://github.com/cocos/cocos-engine/issues/14646 if (JSB) (this.data as any).destroy(); } else if (isImageBitmap(this.data)) { - // TODO: Property 'close' does not exist on type 'HTMLCanvasElement' - (this.data as any)?.close(); + this.data?.close(); } return super.destroy(); } diff --git a/cocos/asset/assets/texture-2d.jsb.ts b/cocos/asset/assets/texture-2d.jsb.ts index 6a9e74c30f..0eca9279ac 100644 --- a/cocos/asset/assets/texture-2d.jsb.ts +++ b/cocos/asset/assets/texture-2d.jsb.ts @@ -50,7 +50,8 @@ export interface ITexture2DSerializeData { } texture2DProto._ctor = function () { - // TODO TODO: Property '_ctor' does not exist on type 'SimpleTexture'. + // TODO: Property '_ctor' does not exist on type 'SimpleTexture'. + // issue: https://github.com/cocos/cocos-engine/issues/14644 (SimpleTexture.prototype as any)._ctor.apply(this, arguments); this._mipmaps = []; }; diff --git a/cocos/core/data/object.ts b/cocos/core/data/object.ts index 9903bee535..0c66471ae1 100644 --- a/cocos/core/data/object.ts +++ b/cocos/core/data/object.ts @@ -319,6 +319,7 @@ class CCObject implements EditorExtendableObject { if (JSB) { // TODO: `_destroy` method only implemented on native @dumganhar + // issue: https://github.com/cocos/cocos-engine/issues/14644 (this as any)._destroy(); } @@ -373,6 +374,7 @@ class CCObject implements EditorExtendableObject { return; } // TODO: '_onPreDestroy' should be define in CCObject class. + // issue: https://github.com/cocos/cocos-engine/issues/14643 ((this as any)._onPreDestroy)?.(); if (!EDITOR || legacyCC.GAME_VIEW) { @@ -380,6 +382,7 @@ class CCObject implements EditorExtendableObject { *hasOwnProperty's detection cannot be passed. */ // TODO: `destruct` is only implemented on native @dumganhar + // issue: https://github.com/cocos/cocos-engine/issues/14644 if (JSB && (this as any).destruct) { (this as any).destruct(); } @@ -419,6 +422,7 @@ if (EDITOR || TEST) { * @method realDestroyInEditor * @private * TODO: this is a dynamic inject method, should be define in class + * issue: https://github.com/cocos/cocos-engine/issues/14643 */ (prototype as any).realDestroyInEditor = function () { if (!(this._objFlags & Destroyed)) { @@ -434,7 +438,7 @@ if (EDITOR || TEST) { }; } -// TODO: `clearImmediate` method is only defined in NodeJS environment. +// NOTE: `clearImmediate` method is only defined in NodeJS environment. declare const clearImmediate: (immediateId: number) => void; if (EDITOR) { js.value(CCObject, '_clearDeferredDestroyTimer', () => { @@ -449,6 +453,7 @@ if (EDITOR) { * @param {Boolean} exporting * @return {object} the serialized json data object * TODO: this is a dynamic inject method, should be define in class + * issue: https://github.com/cocos/cocos-engine/issues/14643 */ (prototype as any)._serialize = null; } @@ -459,6 +464,7 @@ if (EDITOR) { * @param {Object} data - the serialized json data * @param {_Deserializer} ctx * TODO: this is a dynamic inject method, should be define in class + * issue: https://github.com/cocos/cocos-engine/issues/14643 */ (prototype as any)._deserialize = null; diff --git a/cocos/core/utils/jsb-utils.ts b/cocos/core/utils/jsb-utils.ts index 921a7c3f1a..ecc078b2c1 100644 --- a/cocos/core/utils/jsb-utils.ts +++ b/cocos/core/utils/jsb-utils.ts @@ -108,7 +108,8 @@ import type { Node } from '../../scene-graph'; // }); // } -// TODO: we mark node as type of any, because we access much of protected properties here. +// TODO: we mark node as type of any, because the properties we access are only implemented on native. @dumganhar +// issue: https://github.com/cocos/cocos-engine/issues/14644 // export function syncNodeValues (node: Node) { export function syncNodeValues (node: any) { const lpos = node._lpos; diff --git a/cocos/input/types/event/event-acceleration.ts b/cocos/input/types/event/event-acceleration.ts index 9aaf908c38..04c4372afc 100644 --- a/cocos/input/types/event/event-acceleration.ts +++ b/cocos/input/types/event/event-acceleration.ts @@ -51,4 +51,5 @@ export class EventAcceleration extends Event { } // TODO: this is an injected property, should be deprecated +// issue: https://github.com/cocos/cocos-engine/issues/14643 (Event as any).EventAcceleration = EventAcceleration; diff --git a/cocos/input/types/event/event-keyboard.ts b/cocos/input/types/event/event-keyboard.ts index 66bb538de5..8003b8af63 100644 --- a/cocos/input/types/event/event-keyboard.ts +++ b/cocos/input/types/event/event-keyboard.ts @@ -94,4 +94,5 @@ export class EventKeyboard extends Event { } // TODO: this is an injected property, should be deprecated +// issue: https://github.com/cocos/cocos-engine/issues/14643 (Event as any).EventKeyboard = EventKeyboard; diff --git a/cocos/input/types/event/event-mouse.ts b/cocos/input/types/event/event-mouse.ts index 24dfc5407b..67b0657f08 100644 --- a/cocos/input/types/event/event-mouse.ts +++ b/cocos/input/types/event/event-mouse.ts @@ -379,4 +379,5 @@ export class EventMouse extends Event { } // TODO: this is an injected property, should be deprecated +// issue: https://github.com/cocos/cocos-engine/issues/14643 (Event as any).EventMouse = EventMouse; diff --git a/cocos/input/types/event/event-touch.ts b/cocos/input/types/event/event-touch.ts index 50b78e0a18..ae2bd45b54 100644 --- a/cocos/input/types/event/event-touch.ts +++ b/cocos/input/types/event/event-touch.ts @@ -247,4 +247,5 @@ export class EventTouch extends Event { } // TODO: this is an injected property, should be deprecated +// issue: https://github.com/cocos/cocos-engine/issues/14643 (Event as any).EventTouch = EventTouch; diff --git a/cocos/render-scene/scene/camera.jsb.ts b/cocos/render-scene/scene/camera.jsb.ts index 177dccf53e..15e2da4c92 100644 --- a/cocos/render-scene/scene/camera.jsb.ts +++ b/cocos/render-scene/scene/camera.jsb.ts @@ -134,6 +134,7 @@ Object.defineProperty(Camera, "standardExposureValue", { enumerable: true, get () { // TODO: `getStandardExposureValue` only implemented on native platforms. @dumganhar + // issue: https://github.com/cocos/cocos-engine/issues/14644 return (Camera as any).getStandardExposureValue(); }, }); @@ -143,6 +144,7 @@ Object.defineProperty(Camera, "standardLightMeterScale", { enumerable: true, get () { // TODO: `getStandardLightMeterScale` only implemented on native platforms. @dumganhar + // issue: https://github.com/cocos/cocos-engine/issues/14644 return (Camera as any).getStandardLightMeterScale(); }, }); diff --git a/cocos/scene-graph/component.ts b/cocos/scene-graph/component.ts index 7084fc64b0..1c74739e54 100644 --- a/cocos/scene-graph/component.ts +++ b/cocos/scene-graph/component.ts @@ -360,6 +360,7 @@ class Component extends CCObject { public destroy () { if (EDITOR) { // TODO: `_getDependComponent` is an injected method. + // issue: https://github.com/cocos/cocos-engine/issues/14643 const depend = (this.node as any)._getDependComponent(this); if (depend.length > 0) { errorID(3626, diff --git a/cocos/scene-graph/node.jsb.ts b/cocos/scene-graph/node.jsb.ts index b8589e5c43..96d2f36567 100644 --- a/cocos/scene-graph/node.jsb.ts +++ b/cocos/scene-graph/node.jsb.ts @@ -84,6 +84,7 @@ export const TRANSFORM_ON = 1 << 0; const Destroying = CCObject.Flags.Destroying; // TODO: `_setTempFloatArray` is only implemented on Native platforms. @dumganhar +// issue: https://github.com/cocos/cocos-engine/issues/14644 (Node as any)._setTempFloatArray(_tempFloatArray.buffer); function getConstructor(typeOrClassName) { @@ -381,6 +382,7 @@ nodeProto._registerIfAttached = !EDITOR ? undefined : function (this: Node, atta for (let i = 0, len = children.length; i < len; ++i) { const child = children[i]; // TODO: `_registerIfAttached` is an injected property. + // issue: https://github.com/cocos/cocos-engine/issues/14643 (child as any)._registerIfAttached(attached); } }; @@ -1285,6 +1287,7 @@ nodeProto._instantiate = function (cloned: Node, isSyncedNode: boolean) { } if (EDITOR && legacyCC.GAME_VIEW) { // TODO: Property 'sync' does not exist on type 'PrefabInfo'. + // issue: https://github.com/cocos/cocos-engine/issues/14643 const syncing = newPrefabInfo && cloned === newPrefabInfo.root && (newPrefabInfo as any).sync; if (!syncing) { cloned.name += ' (Clone)'; diff --git a/cocos/scene-graph/node.ts b/cocos/scene-graph/node.ts index f9d5dd6347..278185e9b7 100644 --- a/cocos/scene-graph/node.ts +++ b/cocos/scene-graph/node.ts @@ -1332,10 +1332,12 @@ export class Node extends CCObject implements ISchedulable, CustomSerializable { if (!inCurrentSceneBefore && inCurrentSceneNow) { // attached // TODO: `_registerIfAttached` is injected property + // issue: https://github.com/cocos/cocos-engine/issues/14643 (this as any)._registerIfAttached!(true); } else if (inCurrentSceneBefore && !inCurrentSceneNow) { // detached // TODO: `_registerIfAttached` is injected property + // issue: https://github.com/cocos/cocos-engine/issues/14643 (this as any)._registerIfAttached!(false); } @@ -1358,6 +1360,7 @@ export class Node extends CCObject implements ISchedulable, CustomSerializable { const destroyByParent: boolean = (!!parent) && ((parent._objFlags & Destroying) !== 0); if (!destroyByParent && EDITOR) { // TODO: `_registerIfAttached` is injected property + // issue: https://github.com/cocos/cocos-engine/issues/14643 (this as any)._registerIfAttached!(false); } diff --git a/cocos/scene-graph/scene.jsb.ts b/cocos/scene-graph/scene.jsb.ts index d1bc4f82fe..2b94ca35c4 100644 --- a/cocos/scene-graph/scene.jsb.ts +++ b/cocos/scene-graph/scene.jsb.ts @@ -82,6 +82,7 @@ Object.defineProperty(sceneProto, 'renderScene', { sceneProto._ctor = function () { // TODO: Property '_ctor' does not exist on type 'Node'. + // issue: https://github.com/cocos/cocos-engine/issues/14644 (Node.prototype as any)._ctor.apply(this, arguments); this._inited = false; this._renderSceneInternal = null; diff --git a/cocos/scene-graph/scene.ts b/cocos/scene-graph/scene.ts index 55217dad45..b03a6e6930 100644 --- a/cocos/scene-graph/scene.ts +++ b/cocos/scene-graph/scene.ts @@ -186,6 +186,7 @@ export class Scene extends Node { if (EDITOR) { // register all nodes to editor // TODO: `_registerIfAttached` is injected property + // issue: https://github.com/cocos/cocos-engine/issues/14643 (this as any)._registerIfAttached!(active); } legacyCC.director._nodeActivator.activateNode(this, active); diff --git a/cocos/serialization/deserialize-dynamic.ts b/cocos/serialization/deserialize-dynamic.ts index f7185405aa..64cfbe46c1 100644 --- a/cocos/serialization/deserialize-dynamic.ts +++ b/cocos/serialization/deserialize-dynamic.ts @@ -354,6 +354,7 @@ class DeserializerPool extends js.Pool<_Deserializer> { } // TODO: this is should be a HACK, we've changed the method signature +// issue: https://github.com/cocos/cocos-engine/issues/14642 (DeserializerPool.prototype as any).get = function ( this: DeserializerPool, details: Details, @@ -793,6 +794,7 @@ class _Deserializer { const attrs = CCClass.Attr.getClassAttrs(klass); // TODO: `__values__` is injected property + // issue: https://github.com/cocos/cocos-engine/issues/14642 const props: string[] = (klass as any).__values__; if (DEBUG && !props) { error(`Unable to deserialize ${js.getClassName(klass)}. ` @@ -842,6 +844,7 @@ export function deserializeDynamic (data: SerializedData | CCON, details: Detail // TODO: this should be a HACK, we've changed the method signature // workaround: mark pool as type of any. + // issue: https://github.com/cocos/cocos-engine/issues/14642 const deserializer = (_Deserializer.pool as any).get(details, classFinder, reportMissingClass, customEnv, ignoreEditorOnly); cclegacy.game._isCloning = true; diff --git a/editor/src/marionette/preview.ts b/editor/src/marionette/preview.ts index 8f5086903a..c55def059a 100644 --- a/editor/src/marionette/preview.ts +++ b/editor/src/marionette/preview.ts @@ -420,6 +420,7 @@ class MotionEvalRecord { public rebind(bindContext: AnimationGraphBindingContext) { // TODO: please fix type @Leslie Leigh + // Tracking issue: https://github.com/cocos/cocos-engine/issues/14640 const motionEval = this._motion[createEval]({ additive: false, up: bindContext, diff --git a/pal/screen-adapter/minigame/screen-adapter.ts b/pal/screen-adapter/minigame/screen-adapter.ts index 6307870878..f0a427e150 100644 --- a/pal/screen-adapter/minigame/screen-adapter.ts +++ b/pal/screen-adapter/minigame/screen-adapter.ts @@ -41,6 +41,7 @@ try { if (ALIPAY) { if (systemInfo.os === OS.IOS && !minigame.isDevTool) { // TODO: use pal/fs + // issue: https://github.com/cocos/cocos-engine/issues/14647 const fs = my.getFileSystemManager(); const screenOrientation = JSON.parse(fs.readFileSync({ filePath: 'game.json',