mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-06 07:06:11 +00:00
fix: type problem ReactNativeSvg.web.ts (#2374)
# Summary Fix type problem in `ReactNativeSvg.web.ts`
This commit is contained in:
@@ -26,7 +26,6 @@ import type { FilterProps } from './elements/filters/Filter';
|
||||
import type { FeColorMatrixProps } from './elements/filters/FeColorMatrix';
|
||||
import type {
|
||||
GestureResponderEvent,
|
||||
TransformsStyle,
|
||||
ImageProps as RNImageProps,
|
||||
} from 'react-native';
|
||||
import {
|
||||
@@ -40,7 +39,10 @@ import type {
|
||||
} from './lib/extract/types';
|
||||
import SvgTouchableMixin from './lib/SvgTouchableMixin';
|
||||
import { resolve } from './lib/resolve';
|
||||
import { transformsArrayToProps } from './lib/extract/extractTransform';
|
||||
import {
|
||||
transformsArrayToProps,
|
||||
type TransformsStyleArray,
|
||||
} from './lib/extract/extractTransform';
|
||||
import { resolveAssetUri } from './lib/resolveAssetUri';
|
||||
|
||||
type BlurEvent = object;
|
||||
@@ -156,7 +158,7 @@ function parseTransformProp(
|
||||
transformArray.push(`matrix(${transform.join(' ')})`);
|
||||
} else {
|
||||
const stringifiedProps = transformsArrayToProps(
|
||||
transform as TransformsStyle['transform']
|
||||
transform as TransformsStyleArray
|
||||
);
|
||||
transformArray.push(...stringifyTransformProps(stringifiedProps));
|
||||
}
|
||||
|
||||
@@ -8,7 +8,10 @@ import type {
|
||||
TransformProps,
|
||||
} from './types';
|
||||
|
||||
type TransformsStyleArray = Exclude<TransformsStyle['transform'], string>;
|
||||
export type TransformsStyleArray = Exclude<
|
||||
TransformsStyle['transform'],
|
||||
string
|
||||
>;
|
||||
|
||||
function appendTransformProps(props: TransformedProps) {
|
||||
const { x, y, originX, originY, scaleX, scaleY, rotation, skewX, skewY } =
|
||||
|
||||
Reference in New Issue
Block a user