0

I have a dictionary wrapped in an optional called optTest. After unwrapping the optional, it looks like this:

["fileName": "testName",
"fileSize": 10]

Given optTest, I am trying to retrieve fileName from this optional but having some trouble. I've tried this:

if let optTest = optTest but I am getting complaints from compiler. Anyone know how to do this?

Edit: This optional is part of the callback as defined here:

       public func someFunc(
            _ oldPath : String,
            resolver: @escaping RCTPromiseResolveBlock,
            rejector reject: @escaping RCTPromiseRejectBlock)
smolkitty
  • 43
  • 1
  • 5

0 Answers0