Skip to content

Commit

Permalink
⭐️ Impl: Add: RNIDictionaryRepresentable
Browse files Browse the repository at this point in the history
  • Loading branch information
dominicstop committed May 3, 2023
1 parent 0a45f1b commit 24307d6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//
// RNIDictionaryRepresentable.swift
// react-native-ios-modal
//
// Created by Dominic Go on 5/3/23.
//

import Foundation

public protocol RNIDictionaryRepresentable {
var asDictionary: [String: Any] { get };
};
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ extension RNIDictionarySynthesizable {
};
};

if let dictRepresentable = value as? RNIDictionaryRepresentable {
return dictRepresentable.asDictionary;
};

if let encodable = value as? Encodable,
let dict = encodable.asDictionary {

Expand Down

0 comments on commit 24307d6

Please sign in to comment.