Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade typedoc to 0.23.28 #16179

Merged
merged 8 commits into from
Sep 4, 2023
Merged

upgrade typedoc to 0.23.28 #16179

merged 8 commits into from
Sep 4, 2023

Conversation

PPpro
Copy link
Contributor

@PPpro PPpro commented Sep 4, 2023

Re: #14295

Changelog


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.

@@ -38,6 +38,7 @@
"url": "git+https://github.com/cocos-creator/engine.git"
},
"devDependencies": {
"@types/node": "^20.5.9",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why modify node version again?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because there is a type issue on '@types/node' 17, see this issue
microsoft/TypeScript#51567 (comment)

Copy link
Contributor Author

@PPpro PPpro Sep 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the node type version, which should be backward compatible

it's not npm version or the node runtime environment version,
we upgrade this version only to fix type issue

@github-actions
Copy link

github-actions bot commented Sep 4, 2023

Interface Check Report

! WARNING this pull request has changed these public interfaces:

@@ -17582,8 +17582,18 @@
             indexOf(val: T): number;
         }
     }
     export namespace geometry {
+        /**
+         * 几何工具模块
+         * @module geometry
+         */
+        /**
+         * @en
+         * The enum type of basic geometry.
+         * @zh
+         * 形状的类型值。
+         */
         export const enums: {
             SHAPE_RAY: number;
             SHAPE_LINE: number;
             SHAPE_SPHERE: number;
@@ -17662,18 +17672,18 @@
             raySphere: (ray: Ray, sphere: Sphere) => number;
             rayAABB: (ray: Ray, aabb: AABB) => number;
             rayOBB: (ray: Ray, obb: OBB) => number;
             rayPlane: (ray: Ray, plane: Plane) => number;
-            rayTriangle: (ray: Ray, triangle: Triangle, doubleSided?: boolean | undefined) => number;
+            rayTriangle: (ray: Ray, triangle: Triangle, doubleSided?: boolean) => number;
             rayCapsule: (ray: Ray, capsule: Capsule) => number;
-            raySubMesh: (ray: Ray, submesh: RenderingSubMesh, options?: IRaySubMeshOptions | undefined) => number;
-            rayMesh: (ray: Ray, mesh: Mesh, options?: IRayMeshOptions | undefined) => number;
-            rayModel: (r: Ray, model: renderer.scene.Model, options?: IRayMeshOptions | undefined) => number;
+            raySubMesh: (ray: Ray, submesh: RenderingSubMesh, options?: IRaySubMeshOptions) => number;
+            rayMesh: (ray: Ray, mesh: Mesh, options?: IRayMeshOptions) => number;
+            rayModel: (r: Ray, model: renderer.scene.Model, options?: IRayModelOptions) => number;
             lineSphere: typeof __private._cocos_core_geometry_intersect__lineSphere;
             lineAABB: typeof __private._cocos_core_geometry_intersect__lineAABB;
             lineOBB: typeof __private._cocos_core_geometry_intersect__lineOBB;
             linePlane: (line: Line, plane: Plane) => number;
-            lineTriangle: (line: Line, triangle: Triangle, outPt?: math.Vec3 | undefined) => number;
+            lineTriangle: (line: Line, triangle: Triangle, outPt?: math.Vec3) => number;
             sphereWithSphere: (sphere0: Sphere, sphere1: Sphere) => boolean;
             sphereAABB: (sphere: Sphere, aabb: AABB) => boolean;
             sphereOBB: (sphere: Sphere, obb: OBB) => boolean;
             spherePlane: (sphere: Sphere, plane: Plane) => number;
@@ -19502,9 +19512,9 @@
      * // }
      * BitMask(obj);
      * ```
      */
-    export function BitMask<T>(obj: T): T;
+    export function BitMask<T extends object>(obj: T): T;
     export namespace BitMask {
         export var isBitMask: (BitMaskType: any) => any;
         export var getList: (BitMaskDef: any) => any;
         export var update: (BitMaskDef: any) => any;
@@ -19523,14 +19533,14 @@
      * @en A JavaScript literal object containing enum names and values, or a TypeScript enum type.
      * @zh 包含枚举名和值的 JavaScript literal 对象,或者是一个 TypeScript enum 类型。
      * @return @en The defined enum type. @zh 定义的枚举类型。
      */
-    export function Enum<T>(obj: T): T;
+    export function Enum<T extends object>(obj: T): T;
     export namespace Enum {
-        export var update: <T>(obj: T) => T;
-        export var isEnum: <EnumT extends {}>(enumType: EnumT) => boolean;
-        export var getList: <EnumT extends {}>(enumType: EnumT) => readonly __private._cocos_core_value_types_enum__Enum.Enumerator<EnumT>[];
-        export var sortList: <EnumT extends {}>(enumType: EnumT, compareFn: (a: any, b: any) => number) => void;
+        export var update: <T extends object>(obj: T) => T;
+        export var isEnum: <EnumT extends object>(enumType: EnumT) => boolean;
+        export var getList: <EnumT extends object>(enumType: EnumT) => readonly __private._cocos_core_value_types_enum__Enum.Enumerator<EnumT>[];
+        export var sortList: <EnumT extends object>(enumType: EnumT, compareFn: (a: any, b: any) => number) => void;
     }
     /**
      * Make the enum type `enumType` as enumeration so that Creator may identify, operate on it.
      * Formally, as a result of invocation on this function with enum type `enumType`:
@@ -19539,9 +19549,9 @@
      * @param
      * @en enumType An enum type, eg, a kind of type with similar semantic defined by TypeScript.
      * @zh 枚举类型,例如 TypeScript 中定义的类型。
      */
-    export function ccenum<EnumT extends {}>(enumType: EnumT): void;
+    export function ccenum<EnumT extends object>(enumType: EnumT): void;
     /**
      * @en The base class of all value types.
      * @zh 所有值类型的基类。
      */
@@ -20231,9 +20241,9 @@
          * @zh 要添加的属性值,或者取代现有属性的新值。
          * @param writable @en If the property is writable. @zh 属性是否可写。
          * @param enumerable @en If the property is enumerable. @zh 属性是否可枚举。
          */
-        export const value: (object: Record<string | number, any>, propertyName: string, value_: any, writable?: boolean | undefined, enumerable?: boolean | undefined) => void;
+        export const value: (object: Record<string | number, any>, propertyName: string, value_: any, writable?: boolean, enumerable?: boolean) => void;
         /**
          * @en A helper function to add or modify `get`, `set`, `enumerable` or `configurable` of a property.
          * @zh 添加或修改属性的 `get`, `set`, `enumerable` 或者 `configurable`。
          * @param object @en The object to add or modify attributes. @zh 要添加或者修改属性的对象。
@@ -20242,9 +20252,9 @@
          * @param setter @en The setter of a property. @zh 属性的设置函数。
          * @param enumerable @en If the property is enumerable. @zh 属性是否可列举。
          * @param configurable @en If the property is configurable. @zh 属性是否可配置。
          */
-        export const getset: (object: Record<string | number, any>, propertyName: string, getter: __private._types_globals__Getter, setter?: boolean | __private._types_globals__Setter | undefined, enumerable?: boolean | undefined, configurable?: boolean | undefined) => void;
+        export const getset: (object: Record<string | number, any>, propertyName: string, getter: __private._types_globals__Getter, setter?: __private._types_globals__Setter | boolean, enumerable?: boolean, configurable?: boolean) => void;
         /**
          * @en A helper function to add or modify `get`, `enumerable` or `configurable` of a property.
          * @zh 添加或修改属性的 `get`, `enumerable` 或者 `configurable`。
          * @param object @en The object to add or modify attributes. @zh 要添加或者修改属性的对象。
@@ -20252,9 +20262,9 @@
          * @param getter @en The getter of a property. @zh 属性的获取函数。
          * @param enumerable @en If the property is enumerable. @zh 属性是否可列举。
          * @param configurable @en If the property is configurable. @zh 属性是否可配置。
          */
-        export const get: (object: Record<string | number, any>, propertyName: string, getter: __private._types_globals__Getter, enumerable?: boolean | undefined, configurable?: boolean | undefined) => void;
+        export const get: (object: Record<string | number, any>, propertyName: string, getter: __private._types_globals__Getter, enumerable?: boolean, configurable?: boolean) => void;
         /**
          * @en A helper function to add or modify `get`, `enumerable` or `configurable` of a property.
          * @zh 添加或修改属性的 `get`, `enumerable` 或者 `configurable`。
          * @param object @en The object to add or modify attributes. @zh 要添加或者修改属性的对象。
@@ -20262,9 +20272,9 @@
          * @param setter @en The setter of a property. @zh 属性的设置函数。
          * @param enumerable @en If the property is enumerable. @zh 属性是否可列举。
          * @param configurable @en If the property is configurable. @zh 属性是否可配置。
          */
-        export const set: (object: Record<string | number, any>, propertyName: string, setter: __private._types_globals__Setter, enumerable?: boolean | undefined, configurable?: boolean | undefined) => void;
+        export const set: (object: Record<string | number, any>, propertyName: string, setter: __private._types_globals__Setter, enumerable?: boolean, configurable?: boolean) => void;
         /**
          * @deprecated since v3.5.0, this is an engine private interface that will be removed in the future.
          */
         export const _idToClass: Record<string, __private._types_globals__Constructor>;
@@ -56870,9 +56880,9 @@
         add(widget: Widget): void;
         remove(widget: Widget): void;
         onResized(): void;
         refreshWidgetOnResized(node: Node): void;
-        updateOffsetsToStayPut(widget: Widget, e?: __private._cocos_ui_widget__AlignFlags | undefined): void;
+        updateOffsetsToStayPut(widget: Widget, e?: __private._cocos_ui_widget__AlignFlags): void;
         updateAlignment: typeof __private._cocos_ui_widget_manager__updateAlignment;
         AlignMode: typeof __private._cocos_ui_widget__AlignMode;
         AlignFlags: typeof __private._cocos_ui_widget__AlignFlags;
     };
@@ -61663,14 +61673,14 @@
          * @en A JavaScript literal object containing enum names and values, or a TypeScript enum type.
          * @zh 包含枚举名和值的 JavaScript literal 对象,或者是一个 TypeScript enum 类型。
          * @return @en The defined enum type. @zh 定义的枚举类型。
          */
-        export function _cocos_core_value_types_enum__Enum<T>(obj: T): T;
+        export function _cocos_core_value_types_enum__Enum<T extends object>(obj: T): T;
         export namespace _cocos_core_value_types_enum__Enum {
-            var update: <T>(obj: T) => T;
-            var isEnum: <EnumT extends {}>(enumType: EnumT) => boolean;
-            var getList: <EnumT extends {}>(enumType: EnumT) => readonly _cocos_core_value_types_enum__Enum.Enumerator<EnumT>[];
-            var sortList: <EnumT extends {}>(enumType: EnumT, compareFn: (a: any, b: any) => number) => void;
+            var update: <T extends object>(obj: T) => T;
+            var isEnum: <EnumT extends object>(enumType: EnumT) => boolean;
+            var getList: <EnumT extends object>(enumType: EnumT) => readonly _cocos_core_value_types_enum__Enum.Enumerator<EnumT>[];
+            var sortList: <EnumT extends object>(enumType: EnumT, compareFn: (a: any, b: any) => number) => void;
         }
         export namespace _cocos_core_value_types_enum__Enum {
             interface Enumerator<EnumT> {
                 /**
@@ -65520,40 +65530,40 @@
         }
         export interface _cocos_dragon_bones_ArmatureDisplay__BoneIndex extends Number {
             _any: number;
         }
-        export interface ____node_modules_tfig_node_modules_typescript_lib_libdom__EXT_color_buffer_half_float {
+        export interface ____node_modules_typescript_lib_libdom__EXT_color_buffer_half_float {
             readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT: GLenum;
             readonly RGB16F_EXT: GLenum;
             readonly RGBA16F_EXT: GLenum;
             readonly UNSIGNED_NORMALIZED_EXT: GLenum;
         }
-        export interface ____node_modules_tfig_node_modules_typescript_lib_libdom__EXT_color_buffer_half_float {
+        export interface ____node_modules_typescript_lib_libdom__EXT_color_buffer_half_float {
             readonly RGBA16F_EXT: GLenum;
             readonly RGB16F_EXT: GLenum;
             readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT: GLenum;
             readonly UNSIGNED_NORMALIZED_EXT: GLenum;
         }
-        export interface ____node_modules_tfig_node_modules_typescript_lib_libdom__WEBGL_multi_draw {
+        export interface ____node_modules_typescript_lib_libdom__WEBGL_multi_draw {
             multiDrawArraysInstancedWEBGL(mode: GLenum, firstsList: Int32Array | GLint[], firstsOffset: GLuint, countsList: Int32Array | GLsizei[], countsOffset: GLuint, instanceCountsList: Int32Array | GLsizei[], instanceCountsOffset: GLuint, drawcount: GLsizei): void;
             multiDrawArraysWEBGL(mode: GLenum, firstsList: Int32Array | GLint[], firstsOffset: GLuint, countsList: Int32Array | GLsizei[], countsOffset: GLuint, drawcount: GLsizei): void;
             multiDrawElementsInstancedWEBGL(mode: GLenum, countsList: Int32Array | GLsizei[], countsOffset: GLuint, type: GLenum, offsetsList: Int32Array | GLsizei[], offsetsOffset: GLuint, instanceCountsList: Int32Array | GLsizei[], instanceCountsOffset: GLuint, drawcount: GLsizei): void;
             multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | GLsizei[], countsOffset: GLuint, type: GLenum, offsetsList: Int32Array | GLsizei[], offsetsOffset: GLuint, drawcount: GLsizei): void;
         }
-        export interface ____node_modules_tfig_node_modules_typescript_lib_libdom__WEBGL_multi_draw {
+        export interface ____node_modules_typescript_lib_libdom__WEBGL_multi_draw {
             multiDrawArraysWEBGL(mode: GLenum, firstsList: GLint[] | Int32Array, firstsOffset: GLuint, countsList: GLsizei[] | Int32Array, countsOffset: GLuint, drawCount: GLsizei): void;
             multiDrawElementsWEBGL(mode: GLenum, countsList: GLint[] | Int32Array, countsOffset: GLuint, type: GLenum, offsetsList: GLsizei[] | Int32Array, OffsetsOffset: GLuint, drawCount: GLsizei): void;
             multiDrawArraysInstancedWEBGL(mode: GLenum, firstsList: GLint[] | Int32Array, firstsOffset: GLuint, countsList: GLsizei[] | Int32Array, countsOffset: GLuint, instanceCountsList: GLsizei[] | Int32Array, instanceCountsOffset: GLuint, drawCount: GLsizei): void;
             multiDrawElementsInstancedWEBGL(mode: GLenum, countsList: GLint[] | Int32Array, countsOffset: GLuint, type: GLenum, offsetsList: GLsizei[] | Int32Array, OffsetsOffset: GLuint, instanceCountsList: GLsizei[] | Int32Array, instanceCountsOffset: GLuint, drawCount: GLsizei): void;
         }
-        export interface ____node_modules_tfig_node_modules_typescript_lib_libdom__WEBGL_compressed_texture_etc1 {
+        export interface ____node_modules_typescript_lib_libdom__WEBGL_compressed_texture_etc1 {
             readonly COMPRESSED_RGB_ETC1_WEBGL: GLenum;
         }
         // note that ETC1 is not supported with the compressedTexSubImage2D() method
-        export interface ____node_modules_tfig_node_modules_typescript_lib_libdom__WEBGL_compressed_texture_etc1 {
+        export interface ____node_modules_typescript_lib_libdom__WEBGL_compressed_texture_etc1 {
             readonly COMPRESSED_RGB_ETC1_WEBGL: GLenum;
         }
-        export interface ____node_modules_tfig_node_modules_typescript_lib_libdom__WEBGL_compressed_texture_etc {
+        export interface ____node_modules_typescript_lib_libdom__WEBGL_compressed_texture_etc {
             readonly COMPRESSED_R11_EAC: GLenum;
             readonly COMPRESSED_RG11_EAC: GLenum;
             readonly COMPRESSED_RGB8_ETC2: GLenum;
             readonly COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2: GLenum;
@@ -65563,9 +65573,9 @@
             readonly COMPRESSED_SRGB8_ALPHA8_ETC2_EAC: GLenum;
             readonly COMPRESSED_SRGB8_ETC2: GLenum;
             readonly COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2: GLenum;
         }
-        export interface ____node_modules_tfig_node_modules_typescript_lib_libdom__WEBGL_compressed_texture_etc {
+        export interface ____node_modules_typescript_lib_libdom__WEBGL_compressed_texture_etc {
             readonly COMPRESSED_R11_EAC: GLenum;
             readonly COMPRESSED_SIGNED_R11_EAC: GLenum;
             readonly COMPRESSED_RG11_EAC: GLenum;
             readonly COMPRESSED_SIGNED_RG11_EAC: GLenum;
@@ -65588,13 +65598,13 @@
             EXT_frag_depth: EXT_frag_depth | null;
             EXT_shader_texture_lod: EXT_shader_texture_lod | null;
             EXT_sRGB: EXT_sRGB | null;
             OES_vertex_array_object: OES_vertex_array_object | null;
-            EXT_color_buffer_half_float: ____node_modules_tfig_node_modules_typescript_lib_libdom__EXT_color_buffer_half_float | null;
-            WEBGL_multi_draw: ____node_modules_tfig_node_modules_typescript_lib_libdom__WEBGL_multi_draw | null;
+            EXT_color_buffer_half_float: ____node_modules_typescript_lib_libdom__EXT_color_buffer_half_float | null;
+            WEBGL_multi_draw: ____node_modules_typescript_lib_libdom__WEBGL_multi_draw | null;
             WEBGL_color_buffer_float: WEBGL_color_buffer_float | null;
-            WEBGL_compressed_texture_etc1: ____node_modules_tfig_node_modules_typescript_lib_libdom__WEBGL_compressed_texture_etc1 | null;
-            WEBGL_compressed_texture_etc: ____node_modules_tfig_node_modules_typescript_lib_libdom__WEBGL_compressed_texture_etc | null;
+            WEBGL_compressed_texture_etc1: ____node_modules_typescript_lib_libdom__WEBGL_compressed_texture_etc1 | null;
+            WEBGL_compressed_texture_etc: ____node_modules_typescript_lib_libdom__WEBGL_compressed_texture_etc | null;
             WEBGL_compressed_texture_pvrtc: _types_webGLextras__WEBGL_compressed_texture_pvrtc | null;
             WEBGL_compressed_texture_astc: WEBGL_compressed_texture_astc | null;
             WEBGL_compressed_texture_s3tc: WEBGL_compressed_texture_s3tc | null;
             WEBGL_compressed_texture_s3tc_srgb: WEBGL_compressed_texture_s3tc_srgb | null;
@@ -65680,19 +65690,19 @@
             constructor();
             destroy(): void;
             draw(gpuTextureSrc: _cocos_gfx_webgl_webgl_gpu_objects__IWebGLGPUTexture, gpuTextureDst: _cocos_gfx_webgl_webgl_gpu_objects__IWebGLGPUTexture, regions: gfx.TextureBlit[], filter: gfx.Filter): void;
         }
-        export interface ____node_modules_tfig_node_modules_typescript_lib_libdom__EXT_color_buffer_float {
+        export interface ____node_modules_typescript_lib_libdom__EXT_color_buffer_float {
         }
-        export interface ____node_modules_tfig_node_modules_typescript_lib_libdom__EXT_color_buffer_float {
+        export interface ____node_modules_typescript_lib_libdom__EXT_color_buffer_float {
         }
         export interface _cocos_gfx_webgl2_webgl2_define__IWebGL2Extensions {
             EXT_texture_filter_anisotropic: EXT_texture_filter_anisotropic | null;
-            EXT_color_buffer_half_float: ____node_modules_tfig_node_modules_typescript_lib_libdom__EXT_color_buffer_half_float | null;
-            EXT_color_buffer_float: ____node_modules_tfig_node_modules_typescript_lib_libdom__EXT_color_buffer_float | null;
-            WEBGL_multi_draw: ____node_modules_tfig_node_modules_typescript_lib_libdom__WEBGL_multi_draw | null;
-            WEBGL_compressed_texture_etc1: ____node_modules_tfig_node_modules_typescript_lib_libdom__WEBGL_compressed_texture_etc1 | null;
-            WEBGL_compressed_texture_etc: ____node_modules_tfig_node_modules_typescript_lib_libdom__WEBGL_compressed_texture_etc | null;
+            EXT_color_buffer_half_float: ____node_modules_typescript_lib_libdom__EXT_color_buffer_half_float | null;
+            EXT_color_buffer_float: ____node_modules_typescript_lib_libdom__EXT_color_buffer_float | null;
+            WEBGL_multi_draw: ____node_modules_typescript_lib_libdom__WEBGL_multi_draw | null;
+            WEBGL_compressed_texture_etc1: ____node_modules_typescript_lib_libdom__WEBGL_compressed_texture_etc1 | null;
+            WEBGL_compressed_texture_etc: ____node_modules_typescript_lib_libdom__WEBGL_compressed_texture_etc | null;
             WEBGL_compressed_texture_pvrtc: _types_webGLextras__WEBGL_compressed_texture_pvrtc | null;
             WEBGL_compressed_texture_astc: WEBGL_compressed_texture_astc | null;
             WEBGL_compressed_texture_s3tc: WEBGL_compressed_texture_s3tc | null;
             WEBGL_compressed_texture_s3tc_srgb: WEBGL_compressed_texture_s3tc_srgb | null;

@minggo minggo merged commit 7caf1da into cocos:develop Sep 4, 2023
9 checks passed
@PPpro PPpro deleted the dev-typedoc branch September 4, 2023 09:31
@github-actions
Copy link

github-actions bot commented Sep 4, 2023

@PPpro ❗ There was an error during the execution of the tasks. Please check the logs for more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants