mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 21:00:01 +08:00
Add types for react-native-huawei-protected-apps (#29664)
This commit is contained in:
19
types/react-native-huawei-protected-apps/index.d.ts
vendored
Normal file
19
types/react-native-huawei-protected-apps/index.d.ts
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
// Type definitions for react-native-huawei-protected-apps 0.0
|
||||
// Project: https://github.com/pgengoux/react-native-huawei-protected-apps
|
||||
// Definitions by: Christian Chown <https://github.com/christianchown>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.9
|
||||
|
||||
export interface HuaweiProtectedAppsConfig {
|
||||
title: string;
|
||||
text: string;
|
||||
doNotShowAgainText: string;
|
||||
positiveText: string;
|
||||
negativeText: string;
|
||||
}
|
||||
|
||||
declare let HuaweiProtectedApps: {
|
||||
AlertIfHuaweiDevice(config: HuaweiProtectedAppsConfig): void;
|
||||
};
|
||||
|
||||
export default HuaweiProtectedApps;
|
||||
@@ -0,0 +1,12 @@
|
||||
import * as React from "react";
|
||||
import HuaweiProtectedApps from "react-native-huawei-protected-apps";
|
||||
|
||||
const config = {
|
||||
title: "Huawei Protected Apps",
|
||||
text: "This app requires to be enabled in 'Protected Apps' in order to receive push notifcations",
|
||||
doNotShowAgainText: "Do not show again",
|
||||
positiveText: "PROTECTED APPS",
|
||||
negativeText: "CANCEL"
|
||||
};
|
||||
|
||||
HuaweiProtectedApps.AlertIfHuaweiDevice(config);
|
||||
24
types/react-native-huawei-protected-apps/tsconfig.json
Normal file
24
types/react-native-huawei-protected-apps/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-huawei-protected-apps-tests.tsx"
|
||||
]
|
||||
}
|
||||
1
types/react-native-huawei-protected-apps/tslint.json
Normal file
1
types/react-native-huawei-protected-apps/tslint.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user