Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add types for flow and typescript #65

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions SplashScreen.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
declare module 'react-native-smart-splash-screen' {
type UIAnimationNone = 0;
type UIAnimationFade = 1;
type UIAnimationScale = 2;

type AnimationType =
| UIAnimationNone
| UIAnimationFade
| UIAnimationScale;

export interface Options {
animationType: AnimationType,
duration: number,
delay: number,
};

export class SplashScreen {
static close(options: Options): void;
}
}
20 changes: 20 additions & 0 deletions flow/react-native-smart-splash-screen.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
declare module 'react-native-smart-splash-screen' {
declare type UIAnimationNone = 0;
declare type UIAnimationFade = 1;
declare type UIAnimationScale = 2;

declare type AnimationType =
| UIAnimationNone
| UIAnimationFade
| UIAnimationScale;

declare export type Options = {
animationType: AnimationType,
duration: number,
delay: number,
};

declare export class SplashScreen {
static close(options: Options): void;
}
}