From 75b774829ed6abcae5ac69c4f0564d86bbf860c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danilo=20B=C3=BCrger?= Date: Tue, 12 Mar 2019 10:57:29 +0100 Subject: [PATCH] [react-native] allow redeclaring require when node typing is present Fixes ``` Subsequent variable declarations must have the same type. Variable 'require' must be of type 'NodeRequire', but here has type 'ReactNativeRequireFunction'. ``` Caused by https://github.com/DefinitelyTyped/DefinitelyTyped/pull/33302 --- types/react-native/index.d.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/types/react-native/index.d.ts b/types/react-native/index.d.ts index a96ffd41eb..413053ee10 100644 --- a/types/react-native/index.d.ts +++ b/types/react-native/index.d.ts @@ -9297,9 +9297,11 @@ export const PointPropType: React.Validator; export const ViewPropTypes: React.ValidationMap; declare global { - type ReactNativeRequireFunction = (name: string) => any; + interface NodeRequire { + (id: string): any; + } - var require: ReactNativeRequireFunction; + var require: NodeRequire; /** * Console polyfill