fix(lib): fix type errors
This commit is contained in:
parent
6593aad815
commit
e714960335
3 changed files with 4 additions and 6 deletions
|
|
@ -74,8 +74,7 @@ const unsubRAS = waitForModules(
|
|||
// This will result in a crash, because it tries to read the path and run checks on it, but the path is undefined.
|
||||
// @ts-expect-error
|
||||
rAS.addCustomSourceTransformer(({ asset }) => {
|
||||
// @ts-expect-error
|
||||
if (!asset.__packager_asset) return asset
|
||||
if (!(asset as PackagerAsset).__packager_asset) return asset
|
||||
})
|
||||
|
||||
// Asset overrides
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { EventEmitter } from 'node:events'
|
||||
import type { ComponentProps, ComponentType, FC, ReactNode } from 'react'
|
||||
import type { ComponentProps, ComponentType, FC, JSX, ReactNode } from 'react'
|
||||
import type {
|
||||
ImageSourcePropType,
|
||||
ImageStyle,
|
||||
|
|
|
|||
|
|
@ -236,10 +236,9 @@ export function destructure<T extends object>(
|
|||
options?: ProxifyOptions,
|
||||
): T {
|
||||
return new Proxy({} as T, {
|
||||
get: (_, p) =>
|
||||
get: (_, p, r) =>
|
||||
proxify(() => {
|
||||
// @ts-expect-error
|
||||
const v = unproxify(proxified)[p]
|
||||
const v = Reflect.get(unproxify(proxified), p, r)
|
||||
|
||||
if (v == null)
|
||||
throw new TypeError(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue