mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-06-02 19:46:39 +08:00
Fix dynamic links types
This commit is contained in:
4
packages/dynamic-links/lib/index.d.ts
vendored
4
packages/dynamic-links/lib/index.d.ts
vendored
@@ -551,11 +551,11 @@ declare module '@react-native-firebase/app' {
|
||||
import FirebaseModuleWithStatics = ReactNativeFirebase.FirebaseModuleWithStatics;
|
||||
|
||||
interface Module {
|
||||
links: FirebaseModuleWithStatics<DynamicLinks.Module, DynamicLinks.Statics>;
|
||||
dynamicLinks: FirebaseModuleWithStatics<DynamicLinks.Module, DynamicLinks.Statics>;
|
||||
}
|
||||
|
||||
interface FirebaseApp {
|
||||
links(): DynamicLinks.Module;
|
||||
dynamicLinks(): DynamicLinks.Module;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,13 +2,13 @@ import firebase from '@react-native-firebase/app';
|
||||
import defaultExport, { firebase as firebaseFromModule } from '@react-native-firebase/dynamic-links';
|
||||
|
||||
// checks module exists at root
|
||||
console.log(firebase.links().app.name);
|
||||
console.log(firebase.dynamicLinks().app.name);
|
||||
|
||||
// checks module exists at app level
|
||||
console.log(firebase.app().links().app.name);
|
||||
console.log(firebase.app().dynamicLinks().app.name);
|
||||
|
||||
// checks statics exist
|
||||
console.log(firebase.links.SDK_VERSION);
|
||||
console.log(firebase.dynamicLinks.SDK_VERSION);
|
||||
|
||||
// checks statics exist on defaultExport
|
||||
console.log(defaultExport.SDK_VERSION);
|
||||
@@ -24,3 +24,5 @@ console.log(firebaseFromModule.SDK_VERSION);
|
||||
|
||||
// checks default export supports app arg
|
||||
// console.log(defaultExport(firebase.app()).app.name);
|
||||
|
||||
console.log(firebase.dynamicLinks().getInitialLink());
|
||||
|
||||
Reference in New Issue
Block a user