From f87a44f2bd003e70eebabf61930b66e23d0ab39c Mon Sep 17 00:00:00 2001 From: Mister-Hope Date: Sat, 2 Aug 2025 02:24:43 +0800 Subject: [PATCH 1/2] Update lib.wx.api.d.ts --- types/wx/lib.wx.api.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/types/wx/lib.wx.api.d.ts b/types/wx/lib.wx.api.d.ts index 53f3d5b..7183eb4 100644 --- a/types/wx/lib.wx.api.d.ts +++ b/types/wx/lib.wx.api.d.ts @@ -21408,10 +21408,10 @@ Page({ * 在插件中使用:不支持 * * 创建共享变量 `SharedValue`,用于跨线程共享数据和驱动动画。 */ - shared( + shared( /** 初始值,可通过 `.value` 属性进行读取和修改。类型可以是 `number | string | bool | null | undefined | Object | Array | Function`。 */ - initialValue: any - ): SharedValue + initialValue: T + ): SharedValue /** [function worklet.runOnJS(function fn)](https://developers.weixin.qq.com/miniprogram/dev/api/ui/worklet/tool-function/worklet.runOnJS.html) * * 在插件中使用:不支持 From 31f3fd81db4e93c82646579ef5ab323250ffe936 Mon Sep 17 00:00:00 2001 From: Mister-Hope Date: Sat, 2 Aug 2025 02:25:45 +0800 Subject: [PATCH 2/2] Update index.d.ts --- types/wx/index.d.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/types/wx/index.d.ts b/types/wx/index.d.ts index d6deb26..43d89af 100644 --- a/types/wx/index.d.ts +++ b/types/wx/index.d.ts @@ -72,7 +72,9 @@ declare namespace WechatMiniprogram { // TODO: fill worklet type type WorkletFunction = (...args: any) => any type AnimationObject = any - type SharedValue = T + type SharedValue = { + value: T + } type DerivedValue = T }