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 committed Apr 1, 2018
1 parent 640075e commit 562d053
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
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(): Promise<boolean>
export function addEventListener(event: Event, listener: () => any): EmitterSubscription
export function removeEventListener(event: Event, listener: () => any): void

0 comments on commit 562d053

Please sign in to comment.