Skip to content

Commit 3ca9a29

Browse files
committed
Add types
1 parent 43c2643 commit 3ca9a29

File tree

4 files changed

+24
-0
lines changed

4 files changed

+24
-0
lines changed

index.d.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/**
2+
* Get the instance ID
3+
*/
4+
export function getId(): string;
5+
export default FirebaseAppInstanceId;
6+
declare const FirebaseAppInstanceId: {
7+
/**
8+
* Get the instance ID
9+
*/
10+
getId(): string;
11+
};

index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ import { NativeModules } from 'react-native'
22

33
const { FirebaseAppInstanceId } = NativeModules
44

5+
/**
6+
* Get the instance ID
7+
* @return string
8+
*/
59
export function getId() {
610
return FirebaseAppInstanceId.getId()
711
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"version": "1.0.0",
55
"description": "Access the firebase app instance ID",
66
"main": "index.js",
7+
"types": "index.d.ts",
78
"scripts": {
89
"test": "echo \"Error: no test specified\" && exit 1"
910
},

yarn.lock

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2+
# yarn lockfile v1
3+
4+
5+
typescript@^5.5.4:
6+
version "5.5.4"
7+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.5.4.tgz#d9852d6c82bad2d2eda4fd74a5762a8f5909e9ba"
8+
integrity sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==

0 commit comments

Comments
 (0)