mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Add typings for react-native-referrer (#29642)
This commit is contained in:
parent
d96c3407ae
commit
cc0a868dc1
11
types/react-native-referrer/index.d.ts
vendored
Normal file
11
types/react-native-referrer/index.d.ts
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
// Type definitions for react-native-referrer 0.1
|
||||
// Project: https://github.com/JeandeCampredon/react-native-referrer
|
||||
// Definitions by: Christian Chown <https://github.com/christianchown>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.9
|
||||
|
||||
declare let ReactNativeReferrer: {
|
||||
getReferrer(): Promise<string>;
|
||||
};
|
||||
|
||||
export default ReactNativeReferrer;
|
||||
@ -0,0 +1,9 @@
|
||||
import * as React from "react";
|
||||
import { Platform } from "react-native";
|
||||
import ReactNativeReferrer from "react-native-referrer";
|
||||
|
||||
if (Platform.OS === 'android') {
|
||||
ReactNativeReferrer.getReferrer().then(referrerString => {
|
||||
console.log(referrerString);
|
||||
});
|
||||
}
|
||||
24
types/react-native-referrer/tsconfig.json
Normal file
24
types/react-native-referrer/tsconfig.json
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"jsx": "react-native",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"react-native-referrer-tests.tsx"
|
||||
]
|
||||
}
|
||||
1
types/react-native-referrer/tslint.json
Normal file
1
types/react-native-referrer/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Loading…
Reference in New Issue
Block a user