mirror of
https://github.com/react/react-native.git
synced 2026-09-28 13:23:09 +08:00
Allow EventEmitters to be reported as optional (#53804)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53804 ## Changelog: [General] [Fixed] - Allow `EventEmitter`s to be optional (for push safety) Reviewed By: javache Differential Revision: D82509571 fbshipit-source-id: 801a22b10b2709968009527130cfa890d30a4f3a
This commit is contained in:
committed by
Facebook GitHub Bot
parent
d0d08e4554
commit
4308185b64
@@ -540,7 +540,7 @@ function buildEventEmitterSchema(
|
||||
|
||||
return {
|
||||
name: eventemitterName,
|
||||
optional: false,
|
||||
optional: Boolean(property.optional),
|
||||
typeAnnotation: {
|
||||
type: 'EventEmitterTypeAnnotation',
|
||||
typeAnnotation: eventTypeAnnotation,
|
||||
|
||||
Reference in New Issue
Block a user