From 686d44924239f61e43e3dcecfdde32a6cf596802 Mon Sep 17 00:00:00 2001 From: Dmitriy Savchenko Date: Mon, 6 Aug 2018 21:35:26 +0300 Subject: [PATCH] [react-twitter-auth] update types (#27680) * Add missing props * Add more tests * Update types version * Fix specified type version for package * Fix specified version --- types/react-twitter-auth/index.d.ts | 4 ++ .../react-twitter-auth-tests.tsx | 54 ++++++++++++++----- 2 files changed, 46 insertions(+), 12 deletions(-) diff --git a/types/react-twitter-auth/index.d.ts b/types/react-twitter-auth/index.d.ts index cb3faf43fa..962693997c 100644 --- a/types/react-twitter-auth/index.d.ts +++ b/types/react-twitter-auth/index.d.ts @@ -1,6 +1,7 @@ // Type definitions for react-twitter-auth 0.0 // Project: https://github.com/GenFirst/react-twitter-auth // Definitions by: Paul Fasola +// Dmytro Savchenko // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 @@ -17,6 +18,9 @@ interface TwitterLoginProps { dialogHeight?: number; showIcon?: boolean; credentials?: "omit" | "same-origin" | "include"; + customHeaders?: HeadersInit; + children?: React.ReactNode; + forceLogin?: boolean; } declare var TwitterLogin: React.StatelessComponent; diff --git a/types/react-twitter-auth/react-twitter-auth-tests.tsx b/types/react-twitter-auth/react-twitter-auth-tests.tsx index 3bb1e8812d..abed3577d8 100644 --- a/types/react-twitter-auth/react-twitter-auth-tests.tsx +++ b/types/react-twitter-auth/react-twitter-auth-tests.tsx @@ -6,17 +6,47 @@ const ReactTwitterAuth: React.StatelessComponent = () => { function handleFailure(msg: string) {} return ( - +
+ + + + Login with twitter + +
); };