Skip to content

Commit

Permalink
Cast View to the NativeSafeAreaViewInstance for .macos and .windows t…
Browse files Browse the repository at this point in the history
…o get the correct type definitions (#404)

Co-authored-by: Arkady Magomedov <magom001@Arkadys-MacBook-Pro.local>
  • Loading branch information
magom001 and Arkady Magomedov committed Jun 21, 2023
1 parent 016b962 commit 7458d38
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/SafeAreaView.macos.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { View } from 'react-native';
import type { NativeSafeAreaViewInstance } from './SafeArea.types';

export const SafeAreaView = View;
export const SafeAreaView = View as unknown as NativeSafeAreaViewInstance;
3 changes: 2 additions & 1 deletion src/SafeAreaView.windows.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { View } from 'react-native';
import type { NativeSafeAreaViewInstance } from './SafeArea.types';

export const SafeAreaView = View;
export const SafeAreaView = View as unknown as NativeSafeAreaViewInstance;

0 comments on commit 7458d38

Please sign in to comment.