forked from facebook/react-native
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add spec for BlobModule (facebook#24909)
Summary: Part of facebook#24875. Not sure that the id’s types are necessarily correct here… ## Changelog [General] [Added] - Add TM spec for BlobModule Pull Request resolved: facebook#24909 Reviewed By: fkgozali Differential Revision: D15433753 Pulled By: RSNara fbshipit-source-id: 68193d1a82fc7c66d6cc7ba4f22a0d3786987599
- Loading branch information
Showing
4 changed files
with
57 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/** | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
* @flow | ||
* @format | ||
*/ | ||
|
||
'use strict'; | ||
|
||
import type {TurboModule} from 'RCTExport'; | ||
import * as TurboModuleRegistry from 'TurboModuleRegistry'; | ||
|
||
export interface Spec extends TurboModule { | ||
+getConstants: () => {|BLOB_URI_SCHEME: string, BLOB_URI_HOST: ?string|}; | ||
+addNetworkingHandler: () => void; | ||
+addWebSocketHandler: (id: number) => void; | ||
+removeWebSocketHandler: (id: number) => void; | ||
+sendOverSocket: (blob: Object, id: number) => void; | ||
+createFromParts: (parts: Array<Object>, blobId: string) => void; | ||
+release: (blobId: string) => void; | ||
} | ||
|
||
export default TurboModuleRegistry.get<Spec>('BlobModule'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c6e77da
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How should we use Blob in react-native now @ericlewis? I’m getting this error: