react-native-fabric: Provides its own types (#39515)

This commit is contained in:
Alexander T
2019-11-01 10:44:05 -07:00
committed by Jesse Trinity
parent 457b0e46b5
commit 810707434e
5 changed files with 6 additions and 103 deletions
+6
View File
@@ -3516,6 +3516,12 @@
"sourceRepoURL": "https://github.com/react-native-training/react-native-elements",
"asOfVersion": "0.18.0"
},
{
"libraryName": "react-native-fabric",
"typingsPackageName": "react-native-fabric",
"sourceRepoURL": "https://github.com/corymsmith/react-native-fabric",
"asOfVersion": "0.5.2"
},
{
"libraryName": "react-native-goby",
"typingsPackageName": "react-native-goby",
-70
View File
@@ -1,70 +0,0 @@
// Type definitions for react-native-fabric 0.5
// Project: https://github.com/corymsmith/react-native-fabric
// Definitions by: Joseph Roque <https://github.com/josephroque>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export interface CustomAttributes {
[key: string]: any;
}
export namespace Answers {
function logCustom(eventName: string, customAttributes?: CustomAttributes): void;
function logInvite(method: string, customAttributes?: CustomAttributes): void;
function logLevelStart(levelName: string, customAttributes?: CustomAttributes): void;
function logLevelEnd(levelName: string, customAttributes?: CustomAttributes): void;
function logLogin(method: string, success: boolean, customAttributes?: CustomAttributes): void;
function logSearch(query: string, customAttributes?: CustomAttributes): void;
function logSignUp(method: string, success: boolean, customAttributes?: CustomAttributes): void;
function logShare(
method: string,
contentName: string,
contentType: string,
contentId: string,
customAttributes?: CustomAttributes): void;
function logStartCheckout(
totalPrice: number,
count: number,
currency: string,
customAttributes?: CustomAttributes): void;
function logAddToCart(
itemPrice: number,
currency: string,
itemName: string,
itemType: string,
itemId: string,
customAttributes?: CustomAttributes): void;
function logPurchase(
itemPrice: number,
currency: string,
success: boolean,
itemName: string,
itemType: string,
itemId: string,
customAttributes?: CustomAttributes): void;
function logContentView(
contentName: string,
contentType: string,
contentId: string,
customAttributes?: CustomAttributes): void;
function logRating(
rating: number,
contentId: string,
contentType: string,
contentName: string,
customAttributes?: CustomAttributes): void;
}
export namespace Crashlytics {
function crash(): void;
function throwException(): void;
function recordError(error: any): void;
function logException(value: string): void;
function log(message: string): void;
function setUserEmail(email: string): void;
function setUserIdentifier(id: string): void;
function setUserName(userName: string): void;
function setBool(key: string, value: boolean): void;
function setNumber(key: string, value: number): void;
function setString(key: string, value: string): void;
function recordCustomExceptionName(name: string, reason: string, stack?: any[]): void;
}
@@ -1,7 +0,0 @@
import { Answers, Crashlytics } from 'react-native-fabric';
Answers.logSearch('query');
Answers.logCustom('event', { customKey: 0 });
Crashlytics.crash();
Crashlytics.setUserName('name');
-25
View File
@@ -1,25 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"noUnusedParameters": true,
"noUnusedLocals": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"react-native-fabric-tests.ts"
]
}
-1
View File
@@ -1 +0,0 @@
{ "extends": "dtslint/dt.json" }