Commit 5e319ca
Fix boolean type when converting to js (#702)
In iOS, `@(YES)` is converted as `[NSNumber numberWithBool:]`, generating a `__NSCFBoolean` instance.
While `@(1 == 1)` is converted as `[NSNumber numberWithInt:]`, generating a `__NSCFNumber` instance.
And RN converter treat this differently. The first one becomes bool value, and the second one becomes numberic value.
This PR makes sure the return value from native side will match type declaration in ts file `lib/src/interfaces/NotificationPermissions.ts`:
```
export interface NotificationPermissions {
badge: boolean;
alert: boolean;
sound: boolean;
}
```
Co-authored-by: Xi Lin <lxi@tesla.com>1 parent d78e7a0 commit 5e319ca
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
83 | | - | |
84 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| |||
0 commit comments