Skip to content

Commit af6ab2b

Browse files
committed
chore: re-exports types from root
1 parent ce3ca90 commit af6ab2b

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

src/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import {NativeModules} from 'react-native';
2-
import {RNKakaoLoginModule} from './types';
2+
import {KakaoLoginModuleInterface} from './types';
33

44
const {RNKakaoLogins} = NativeModules;
55

6-
const NativeKakaoLogins: RNKakaoLoginModule = {
6+
const NativeKakaoLogins: KakaoLoginModuleInterface = {
77
login() {
88
return RNKakaoLogins.login();
99
},
@@ -30,3 +30,5 @@ export const logout = NativeKakaoLogins.logout;
3030
export const unlink = NativeKakaoLogins.unlink;
3131
export const getProfile = NativeKakaoLogins.getProfile;
3232
export const getAccessToken = NativeKakaoLogins.getAccessToken;
33+
34+
export * from './types';

src/index.web.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import {KaKaoLoginWebType, RNKakaoLoginModule} from './types';
1+
import {KaKaoLoginWebType, KakaoLoginModuleInterface} from './types';
22

3-
const WebKakaoLogins: RNKakaoLoginModule = {
3+
const WebKakaoLogins: KakaoLoginModuleInterface = {
44
login(props?: KaKaoLoginWebType) {
55
if (!props) {
66
throw new Error('Web parameters are not provided');
@@ -68,3 +68,5 @@ export const logout = WebKakaoLogins.logout;
6868
export const unlink = WebKakaoLogins.unlink;
6969
export const getProfile = WebKakaoLogins.getProfile;
7070
export const getAccessToken = WebKakaoLogins.getAccessToken;
71+
72+
export * from './types';

src/types/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export interface RNKakaoLoginModule {
1+
export interface KakaoLoginModuleInterface {
22
login(): Promise<KakaoOAuthToken>;
33
login(props: KaKaoLoginWebType): Promise<KakaoOAuthWebToken>;
44

0 commit comments

Comments
 (0)