Chore/fix lintter and ts on source prop (#3361)
* fix: Fix types for `ReactVideoSource` to also allow `require(..)` sources We need to be careful here to not use `any`, so I used `NodeRequire` - which is afaik present in all React Native environments as a type. --------- Co-authored-by: Marc Rousavy <me@mrousavy.com> Co-authored-by: olivier <olivier.bouillet@ifeelsmart.com>
This commit is contained in:
@@ -6,7 +6,7 @@ import type FilterType from './FilterType';
|
||||
|
||||
export type Headers = Record<string, string>;
|
||||
|
||||
export type ReactVideoSource = Readonly<{
|
||||
export type ReactVideoSourceProperties = {
|
||||
uri?: string;
|
||||
isNetwork?: boolean;
|
||||
isAsset?: boolean;
|
||||
@@ -21,7 +21,11 @@ export type ReactVideoSource = Readonly<{
|
||||
subtitle?: string;
|
||||
description?: string;
|
||||
customImageUri?: string;
|
||||
}>;
|
||||
};
|
||||
|
||||
export type ReactVideoSource = Readonly<
|
||||
ReactVideoSourceProperties | NodeRequire
|
||||
>;
|
||||
|
||||
export type DebugConfig = Readonly<{
|
||||
enable?: boolean;
|
||||
|
Reference in New Issue
Block a user