ue 如何调用ts 异步返回promise #2022
Unanswered
zhuang0920
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
ue 如何调用ts 异步返回promise , 并在ue侧 接收 promise
C++
GetA(TFunction ){ }
TS
GetA.Bind(async (id) => {
return new Promise((resolve, reject) => {
setTimeout(() => {
const success = true; // Simulate success/failure
if (success) {
resolve("Data loaded successfully");
} else {
reject("Error loading data");
}
}, 1000);
});
})
Beta Was this translation helpful? Give feedback.
All reactions