u
This commit is contained in:
1 parent
458f0cd6ac
commit
2347d55823
8 files changed
+299
-150
No files matched your search
@@ -0,0 +1,8 @@
|
||||
// utils/runOnMain.ts
|
||||
// ✅ 安全封装 runOnJS,屏蔽 deprecated 警告
|
||||
import { runOnJS as _runOnJS } from 'react-native-worklets'
|
||||
|
||||
// 屏蔽类型定义中的 deprecated 提示
|
||||
export const runOnMain = ((fn: (...args: any[]) => void) => {
|
||||
return _runOnJS(fn)
|
||||
}) as typeof _runOnJS
|
||||
Reference in new issue
Block a user