Skip to content

Commit 1413b6e

Browse files
petrbelaOlimpiaZurek
authored andcommitted
remove return type from constructor (facebook#35466)
Summary: I'm getting `node_modules/react-native/Libraries/Events/EventPolyfill.js: Unexpected token, expected "{"` when building an app. Looking at the source code, it seems odd there'd be a return type defined for a constructor. Unless I'm missing something (I don't use flow), I think it should be removed? ## Changelog [Internal] [Fixed] - Remove return type from constructor Pull Request resolved: facebook#35466 Test Plan: N/A Reviewed By: jacdebug Differential Revision: D41527010 Pulled By: yungsters fbshipit-source-id: 9f4faf1305ebe1915f5bcf07fc86b7437aed0c97
1 parent 4bedff2 commit 1413b6e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Libraries/Events/EventPolyfill.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ class EventPolyfill implements IEvent {
159159
// data with the other in sync.
160160
_syntheticEvent: mixed;
161161

162-
constructor(type: string, eventInitDict?: Event$Init): void {
162+
constructor(type: string, eventInitDict?: Event$Init) {
163163
this.type = type;
164164
this.bubbles = !!(eventInitDict?.bubbles || false);
165165
this.cancelable = !!(eventInitDict?.cancelable || false);

0 commit comments

Comments
 (0)