Skip to content

Commit 8099b18

Browse files
committed
Update types
1 parent 7251353 commit 8099b18

2 files changed

Lines changed: 15 additions & 12 deletions

File tree

src/native-ads/AdIconViewManager.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
import React from 'react';
22
import { requireNativeComponent, ViewProps } from 'react-native';
33

4-
import { AdIconViewContext, AdIconViewContextValueType } from './contexts';
4+
import {
5+
AdIconViewContext,
6+
AdIconViewContextValueType,
7+
ComponentOrClass,
8+
} from './contexts';
59
import { NativeAd } from './nativeAd';
610

711
export type AdIconViewProps = ViewProps;
@@ -14,9 +18,9 @@ export const NativeAdIconView = requireNativeComponent<AdIconViewProps>(
1418
class AdIconViewChild extends React.Component<
1519
AdIconViewProps & AdIconViewContextValueType
1620
> {
17-
private iconView: React.ReactNode | null = null;
21+
private iconView: ComponentOrClass | null = null;
1822

19-
private handleAdIconViewRef = (ref: React.ReactNode) => {
23+
private handleAdIconViewRef = (ref: ComponentOrClass | null) => {
2024
if (this.iconView) {
2125
this.props.unregister();
2226
this.iconView = null;

src/native-ads/MediaViewManager.tsx

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
import React, { ReactNode } from 'react';
1+
import React from 'react';
2+
import { requireNativeComponent, ViewProps } from 'react-native';
23
import {
3-
requireNativeComponent,
4-
StyleProp,
5-
ViewStyle,
6-
ViewProps,
7-
} from 'react-native';
8-
import { MediaViewContext, MediaViewContextValueType } from './contexts';
4+
ComponentOrClass,
5+
MediaViewContext,
6+
MediaViewContextValueType,
7+
} from './contexts';
98

109
export type MediaViewProps = ViewProps;
1110

@@ -17,9 +16,9 @@ export const NativeMediaView = requireNativeComponent<MediaViewProps>(
1716
class MediaViewChild extends React.Component<
1817
MediaViewProps & MediaViewContextValueType
1918
> {
20-
private mediaView: ReactNode;
19+
private mediaView: ComponentOrClass | null = null;
2120

22-
private handleMediaViewMount = (ref: ReactNode) => {
21+
private handleMediaViewMount = (ref: ComponentOrClass | null) => {
2322
if (this.mediaView) {
2423
this.props.unregister();
2524
this.mediaView = null;

0 commit comments

Comments
 (0)