Open stereodenis opened 4 days ago
Hey @stereodenis! I'm here to help you with any bugs or questions you have while waiting for a human maintainer. Let's tackle this together!
I found a similar closed issue that might be relevant to your problem: 我完全根据文档例子使用,却报错无法使用。 [1].
The error you're encountering, "Property 'push' does not exist on type...", suggests that the array transform
is being treated as a read-only array. The type definition of the array being manipulated in stack.ts:99
is TransformsStyle["transform"]
[2].
To resolve this issue, you can try casting the array to a mutable type before using the push
method. Here's an example of how you might do this:
const transform: TransformsStyle["transform"] = [] as TransformsStyle["transform"] & { push: any[]["push"] };
This will allow you to use the push
method on the transform
array without TypeScript throwing an error.
To continue talking to Dosu, mention @dosu.
node_modules/react-native-reanimated-carousel/src/layouts/stack.ts:99