cocos-engine icon indicating copy to clipboard operation
cocos-engine copied to clipboard

[Bug] Fix some definition errors

Open VisualSJ opened this issue 2 years ago • 1 comments

Re: #

Changelog

  • Fix some definition errors

Continuous Integration

This pull request:

  • [ ] needs automatic test cases check.

    Manual trigger with @cocos-robot run test cases afterward.

  • [ ] does not change any runtime related code or build configuration

    If any reviewer thinks the CI checks are needed, please uncheck this option, then close and reopen the issue.


Compatibility Check

This pull request:

  • [ ] changes public API, and have ensured backward compatibility with deprecated features.
  • [ ] affects platform compatibility, e.g. system version, browser version, platform sdk version, platform toolchain, language version, hardware compatibility etc.
  • [ ] affects file structure of the build package or build configuration which requires user project upgrade.
  • [ ] introduces breaking changes, please list all changes, affected features and the scope of violation.

VisualSJ avatar Nov 07 '23 06:11 VisualSJ

Interface Check Report

! WARNING this pull request has changed these public interfaces:

@@ -19830,8 +19830,32 @@
              * @param array @zh 用来拷贝的数组。@en The array to be copied from.
              * @returns @zh 数组的副本。@en A new array has the same values as `array`.
              */
             export function copy<T>(array: T[]): T[];
+            /**
+             * @example
+             * ```
+             * import { js } from 'cc';
+             * var array = [0, 1, 2, 3, 4];
+             * var iterator = new js.array.MutableForwardIterator(array);
+             * for (iterator.i = 0; iterator.i < array.length; ++iterator.i) {
+             *     var item = array[iterator.i];
+             *     ...
+             * }
+             * ```
+             */
+            export class MutableForwardIterator<T> {
+                array: T[];
+                i: number;
+                constructor(array: T[]);
+                get length(): number;
+                set length(value: number);
+                remove(value: T): void;
+                removeAt(i: number): void;
+                fastRemove(value: T): void;
+                fastRemoveAt(i: number): void;
+                push(item: T): void;
+            }
         }
         /**
          * @deprecated since v3.7.0, `js.js` is deprecated, please access `js` directly instead.
          */
@@ -51185,9 +51209,9 @@
                 event(entry: TrackEntry, event: Event): void;
             }
             export class AnimationStateData {
                 skeletonData: SkeletonData;
-                animationToMixTime: Map<number>;
+                animationToMixTime: Map<string, number>;
                 defaultMix: number;
                 constructor(skeletonData: SkeletonData);
                 setMix(fromName: string, toName: string, duration: number): void;
                 setMixWith(from: Animation, to: Animation, duration: number): void;
@@ -51207,9 +51231,9 @@
                 getToLoad(): number;
                 getLoaded(): number;
                 dispose(): void;
                 hasErrors(): boolean;
-                getErrors(): Map<string>;
+                getErrors(): Map<string, string>;
             }
             export class AtlasAttachmentLoader implements AttachmentLoader {
                 atlas: TextureAtlas;
                 constructor(atlas: TextureAtlas);
@@ -51406,9 +51430,9 @@
                 get(clientId: string, path: string): any;
                 isLoadingComplete(clientId: string): boolean;
                 dispose(): void;
                 hasErrors(): boolean;
-                getErrors(): Map<string>;
+                getErrors(): Map<string, string>;
             }
             export class Skeleton {
                 data: SkeletonData;
                 bones: Array<Bone>;
@@ -51531,9 +51555,9 @@
             export class SkeletonJson {
                 attachmentLoader: AttachmentLoader;
                 scale: number;
                 constructor(attachmentLoader: AttachmentLoader);
-                readSkeletonData(json: any): SkeletonData;
+                readSkeletonData(json: string): SkeletonData;
                 readAttachment(map: any, skin: Skin, slotIndex: number, name: string, skeletonData: SkeletonData): Attachment;
                 readVertices(map: any, attachment: VertexAttachment, verticesLength: number): void;
                 readAnimation(map: any, name: string, skeletonData: SkeletonData): void;
                 readCurve(map: any, timeline: CurveTimeline, frameIndex: number): void;
@@ -51551,9 +51575,9 @@
                 constructor(slotIndex: number, name: string, attachment: Attachment);
             }
             export class Skin {
                 name: string;
-                attachments: Map<Attachment>[];
+                attachments: Map<string, Attachment>[];
                 bones: BoneData[];
                 constraints: ConstraintData[];
                 constructor(name: string);
                 setAttachment(slotIndex: number, name: string, attachment: Attachment): void;
@@ -51701,11 +51725,8 @@
             export abstract class Updatable {
                 update(): void;
                 isActive(): boolean;
             }
-            export interface Map<T> {
-                [key: string]: T;
-            }
             export class IntSet {
                 array: number[];
                 add(value: number): boolean;
                 contains(value: number): boolean;

github-actions[bot] avatar Nov 07 '23 07:11 github-actions[bot]