如何从函数中删除 Bool 返回而不出现错误:
Generic parameter 'T' could not be inferred
Run Code Online (Sandbox Code Playgroud)
这是函数:
private func syncDataStore() async throws -> Bool {
try await withUnsafeThrowingContinuation { continuation in
Amplify.DataStore.stop { (result) in
switch(result) {
case .success:
Amplify.DataStore.start { (result) in
switch(result) {
case .success:
print("DataStore started")
continuation.resume(returning: true)
case .failure(let error):
print("Error starting DataStore:\(error)")
continuation.resume(throwing: error)
}
}
case .failure(let error):
print("Error stopping DataStore:\(error)")
continuation.resume(throwing: error)
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
这就是我尝试做的,但我收到上面提到的错误:
private func syncDataStore() async throws {
try await withUnsafeThrowingContinuation { continuation in …Run Code Online (Sandbox Code Playgroud) 基于这个页面我可以做:
aws cloudformation delete-stack \
--stack-name my-stack
Run Code Online (Sandbox Code Playgroud)
它说我可以附加命令:
[--retain-resources <value>]
这是否意味着如果我不指定该行,堆栈创建的所有资源都将被删除?我试图删除堆栈生成的所有内容,数量很多。
我怎样才能实现这个目标?
谢谢
amazon-web-services aws-cloudformation aws-cli aws-cloudformation-custom-resource