File tree Expand file tree Collapse file tree 5 files changed +7
-14
lines changed
react-native-reanimated/src
react-native-worklets/src Expand file tree Collapse file tree 5 files changed +7
-14
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ function isWindowAvailable() {
1010}
1111
1212export const IS_ANDROID : boolean = Platform . OS === 'android' ;
13- /** @knipIgnore */
1413export const IS_IOS : boolean = Platform . OS === 'ios' ;
1514export const IS_WEB : boolean = Platform . OS === 'web' ;
1615export const IS_JEST : boolean = ! ! process . env . JEST_WORKER_ID ;
Original file line number Diff line number Diff line change @@ -18,15 +18,15 @@ function ReanimatedErrorConstructor(message: string): ReanimatedError {
1818export function registerReanimatedError ( ) {
1919 'worklet' ;
2020 if ( globalThis . __RUNTIME_KIND !== RuntimeKind . ReactNative ) {
21- globalThis . ReanimatedError =
22- ReanimatedErrorConstructor as IReanimatedErrorConstructor ;
21+ ( globalThis as Record < string , unknown > ) . ReanimatedError =
22+ ReanimatedErrorConstructor ;
2323 }
2424}
2525
2626export const ReanimatedError =
2727 ReanimatedErrorConstructor as IReanimatedErrorConstructor ;
2828
29- export interface IReanimatedErrorConstructor extends Error {
29+ interface IReanimatedErrorConstructor extends Error {
3030 new ( message ?: string ) : ReanimatedError ;
3131 ( message ?: string ) : ReanimatedError ;
3232 readonly prototype : ReanimatedError ;
Original file line number Diff line number Diff line change 33// This file works by accident - currently Builder Bob doesn't move `.d.ts` files to output types.
44// If it ever breaks, we should address it so we'd not pollute the user's global namespace.
55
6- import type {
7- IReanimatedErrorConstructor ,
8- LoggerConfigInternal ,
9- } from './common' ;
6+ import type { LoggerConfigInternal } from './common' ;
107import type {
118 MapperRegistry ,
129 MeasuredDimensions ,
@@ -82,5 +79,4 @@ declare global {
8279 * future.
8380 */
8481 var __frameTimestamp : number | undefined ;
85- var ReanimatedError : IReanimatedErrorConstructor ;
8682}
Original file line number Diff line number Diff line change @@ -19,8 +19,8 @@ function WorkletsErrorConstructor(message?: string): WorkletsError {
1919export function registerWorkletsError ( ) {
2020 'worklet' ;
2121 if ( globalThis . __RUNTIME_KIND !== RuntimeKind . ReactNative ) {
22- globalThis . WorkletsError =
23- WorkletsErrorConstructor as IWorkletsErrorConstructor ;
22+ ( globalThis as Record < string , unknown > ) . WorkletsError =
23+ WorkletsErrorConstructor ;
2424 }
2525}
2626
@@ -29,7 +29,7 @@ export const WorkletsError =
2929
3030export type WorkletsError = Error & { name : 'Worklets' } ; // signed type
3131
32- export interface IWorkletsErrorConstructor extends Error {
32+ interface IWorkletsErrorConstructor extends Error {
3333 new ( message ?: string ) : WorkletsError ;
3434 ( message ?: string ) : WorkletsError ;
3535 readonly prototype : WorkletsError ;
Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ import type { callGuardDEV } from './callGuard';
66import type { reportFatalRemoteError } from './errors' ;
77import type { Queue } from './runLoop/workletRuntime/taskQueue' ;
88import type { SynchronizableUnpacker } from './synchronizableUnpacker' ;
9- import type { IWorkletsErrorConstructor } from './WorkletsError' ;
109import type { WorkletsModuleProxy } from './WorkletsModule' ;
1110import type { ValueUnpacker } from './workletTypes' ;
1211
@@ -70,7 +69,6 @@ declare global {
7069 worklet : SerializableRef < ( ) => void >
7170 ) => void ;
7271 var _microtaskQueueFinalizers : ( ( ) => void ) [ ] ;
73- var WorkletsError : IWorkletsErrorConstructor ;
7472 var _scheduleTimeoutCallback : ( delay : number , handlerId : number ) => void ;
7573 var __runTimeoutCallback : ( handlerId : number ) => void ;
7674 var __flushMicrotasks : ( ) => void ;
You can’t perform that action at this time.
0 commit comments