Skip to content

Commit

Permalink
Add TypeScript definitions
Browse files Browse the repository at this point in the history
Closes #87
  • Loading branch information
brunolemos authored Jan 14, 2018
1 parent 640075e commit 1aeb58a
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions react-native-safari-view.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
declare module 'react-native-safari-view' {
import { EmitterSubscription } from 'react-native'

export type Event = 'onShow' | 'onDismiss'
export interface SafaryOptions {
url: string
readerMode?: boolean
tintColor?: string
barTintColor?: string
fromBottom?: boolean
}

export function show(options: SafaryOptions): void
export function dismiss(): void
export function isAvailable(): boolean
export function addEventListener(event: Event, listener: () => any): EmitterSubscription
export function removeEventListener(event: Event, listener: () => any): void
}

0 comments on commit 1aeb58a

Please sign in to comment.