fire: (FileReader) remove unused _subscriptions attribute (#33946)

Summary:
I was reading source code, and I noticed the _subscriptions attribute (and the _clearSubscriptions method) of the FileReader is not used.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[Internal] [Changed] - Remove unused _subscriptions attribute in FileReader

Pull Request resolved: https://github.com/facebook/react-native/pull/33946

Test Plan: I checked that flow and jest are still green as I can't think about another way.

Reviewed By: lunaleaps

Differential Revision: D36807828

Pulled By: cortinico

fbshipit-source-id: 9bb599bbc7b79d2b4c010ba84cc8777e29b974ca
This commit is contained in:
Antoine Doubovetzky
2022-06-01 17:13:11 -07:00
committed by Facebook GitHub Bot
parent 927b43d47c
commit dbcada0391
-6
View File
@@ -46,7 +46,6 @@ class FileReader extends (EventTarget(...READER_EVENTS): any) {
_error: ?Error;
_result: ?ReaderResult;
_aborted: boolean = false;
_subscriptions: Array<any> = [];
constructor() {
super();
@@ -59,11 +58,6 @@ class FileReader extends (EventTarget(...READER_EVENTS): any) {
this._result = null;
}
_clearSubscriptions(): void {
this._subscriptions.forEach(sub => sub.remove());
this._subscriptions = [];
}
_setReadyState(newState: ReadyState) {
this._readyState = newState;
this.dispatchEvent({type: 'readystatechange'});