Skip to content

Commit a35da71

Browse files
feat: added ts generic
1 parent c8b84e2 commit a35da71

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ const ReactNativeDynamicAppIcon = NativeModules.ReactNativeDynamicAppIcon
1717
}
1818
);
1919

20-
export function changeIcon(iconName: string): Promise<void> {
20+
export function changeIcon<T extends string>(iconName: T): Promise<void> {
2121
return ReactNativeDynamicAppIcon.changeIcon(iconName);
2222
}
2323

24-
export function getIcon(): Promise<string> {
24+
export function getIcon<T extends string>(): Promise<T> {
2525
return ReactNativeDynamicAppIcon.getIcon();
2626
}

0 commit comments

Comments
 (0)