     var jsIdentifier: Double {
         return Double(UInt64(objectId) & ((1 << 53) - 1))
     }
-    var asJSObject: Any {
+    var asJSObject: [AnyHashable: Any] {
         return [
             "id": jsIdentifier,
             "uuid": uuid.fullUUIDString,

    var jsIdentifier: Double {
        return Double(UInt64(objectId) & ((1 << 53) - 1))
    }
    var asJSObject: Any {
        return [
            "id": jsIdentifier,
            "uuid": uuid.fullUUIDString,

}

extension Peripheral {
    func asJSObject(withRssi: Int? = nil) -> [AnyHashable: Any] {
        return [
            "id": identifier.uuidString,
            "name": name as Any,
