Created
December 28, 2023 00:17
-
-
Save benschac/35def44cd118b96a63dcead4ad384171 to your computer and use it in GitHub Desktop.
expo-av next.js video patch
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
diff --git a/registry.js b/registry.js | |
index 02470da3c4962ad1bbdc62d9ed295c19ca4905fe..3d1ec8b8153f8aa7a7597d933097301973225f1e 100644 | |
--- a/registry.js | |
+++ b/registry.js | |
@@ -4,35 +4,21 @@ | |
* This source code is licensed under the MIT license found in the | |
* LICENSE file in the root directory of this source tree. | |
* | |
- * @flow strict | |
- * @format | |
+ * | |
*/ | |
-'use strict'; | |
- | |
-export type PackagerAsset = { | |
- +__packager_asset: boolean, | |
- +fileSystemLocation: string, | |
- +httpServerLocation: string, | |
- +width: ?number, | |
- +height: ?number, | |
- +scales: Array<number>, | |
- +hash: string, | |
- +name: string, | |
- +type: string, | |
- ... | |
-}; | |
+"use strict"; | |
-const assets: Array<PackagerAsset> = []; | |
+const assets = []; | |
-function registerAsset(asset: PackagerAsset): number { | |
+function registerAsset(asset) { | |
// `push` returns new array length, so the first asset will | |
// get id 1 (not 0) to make the value truthy | |
return assets.push(asset); | |
} | |
-function getAssetByID(assetId: number): PackagerAsset { | |
+function getAssetByID(assetId) { | |
return assets[assetId - 1]; | |
} | |
-module.exports = {registerAsset, getAssetByID}; | |
+module.exports = { registerAsset, getAssetByID }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment