Skip to content

Commit a965607

Browse files
committed
lint
1 parent 21498a6 commit a965607

6 files changed

Lines changed: 16 additions & 15 deletions

File tree

packages/react-native-reanimated/src/WorkletEventHandlerBase.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ type JSEvent<Event extends object> = NativeSyntheticEvent<EventPayload<Event>>;
1212
// In JS implementation (e.g. for web) we don't use Reanimated's
1313
// event emitter, therefore we have to handle here
1414
// the event that came from React Native and convert it.
15-
export function jsListener<Event extends object>(
15+
function jsListener<Event extends object>(
1616
eventName: string,
1717
handler: (event: ReanimatedEvent<Event>) => void
1818
) {

packages/react-native-reanimated/src/animation/utilBase.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ import {
4747
* object to prevent from freezing it in development.
4848
*/
4949
export const IN_STYLE_UPDATER = { current: false };
50-
export const IN_STYLE_UPDATER_UI = createSerializable({ current: false });
50+
const IN_STYLE_UPDATER_UI = createSerializable({ current: false });
5151
// is-tree-shakable-suppress
5252
serializableMappingCache.set(IN_STYLE_UPDATER, IN_STYLE_UPDATER_UI);
5353

54-
export const LAYOUT_ANIMATION_SUPPORTED_PROPS = {
54+
const LAYOUT_ANIMATION_SUPPORTED_PROPS = {
5555
originX: true,
5656
originY: true,
5757
width: true,
@@ -64,7 +64,7 @@ export const LAYOUT_ANIMATION_SUPPORTED_PROPS = {
6464
backgroundColor: true,
6565
};
6666

67-
export type LayoutAnimationProp = keyof typeof LAYOUT_ANIMATION_SUPPORTED_PROPS;
67+
type LayoutAnimationProp = keyof typeof LAYOUT_ANIMATION_SUPPORTED_PROPS;
6868

6969
export function isValidLayoutAnimationProp(prop: string) {
7070
'worklet';
@@ -85,7 +85,7 @@ export function initialUpdaterRun<T>(updater: () => T) {
8585
return result;
8686
}
8787

88-
export interface RecognizedPrefixSuffix {
88+
interface RecognizedPrefixSuffix {
8989
prefix?: string;
9090
suffix?: string;
9191
strippedValue: number;

packages/react-native-reanimated/src/common/constants/platform.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@ export const IS_WINDOWS: boolean = Platform?.OS === 'windows';
2020

2121
export const IS_WINDOW_AVAILABLE: boolean = isWindowAvailable();
2222

23+
/** @knipIgnore */
2324
export const SHOULD_BE_USE_WEB = IS_JEST || IS_WEB || IS_WINDOWS;

packages/react-native-reanimated/src/hook/useAnimatedStyleBase.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import type { ViewDescriptorsSet } from '../ViewDescriptorsSet';
1717
import type { Descriptor } from './commonTypes';
1818
import { isAnimated, shallowEqual } from './utils';
1919

20-
export interface AnimatedState {
20+
interface AnimatedState {
2121
// eslint-disable-next-line @typescript-eslint/no-explicit-any
2222
last: AnimatedStyle<any>;
2323
// eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -38,7 +38,7 @@ export interface AnimatedUpdaterData {
3838
styleUpdaterContainer: StyleUpdaterContainer;
3939
}
4040

41-
export function prepareAnimation(
41+
function prepareAnimation(
4242
frameTimestamp: number,
4343
// eslint-disable-next-line @typescript-eslint/no-explicit-any
4444
animatedProp: AnimatedStyle<any>,
@@ -101,7 +101,7 @@ export function prepareAnimation(
101101
}
102102
}
103103

104-
export function runAnimations(
104+
function runAnimations(
105105
// eslint-disable-next-line @typescript-eslint/no-explicit-any
106106
animation: AnimatedStyle<any>,
107107
timestamp: Timestamp,

packages/react-native-reanimated/src/hook/useHandlerBase.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { isWorkletFunction } from 'react-native-worklets';
55
import type { UnknownRecord } from '../common';
66
import type { ReanimatedEvent } from './commonTypes';
77

8-
export interface GeneralHandler<
8+
interface GeneralHandler<
99
TEvent extends object,
1010
TContext extends UnknownRecord,
1111
> {
@@ -38,16 +38,16 @@ export function ensureWorkletHandlers(handlers: UnknownRecord) {
3838
}
3939
}
4040

41-
export const objectIs: (a: unknown, b: unknown) => boolean =
41+
const objectIs: (a: unknown, b: unknown) => boolean =
4242
typeof Object.is === 'function'
4343
? Object.is
4444
: (x, y) =>
4545
(x === y && (x !== 0 || 1 / (x as number) === 1 / (y as number))) ||
4646
(Number.isNaN(x as number) && Number.isNaN(y as number));
4747

48-
export type WorkletClosure = Record<string, unknown>;
48+
type WorkletClosure = Record<string, unknown>;
4949

50-
export function areWorkletClosuresEqual(
50+
function areWorkletClosuresEqual(
5151
next: WorkletClosure,
5252
prev: WorkletClosure
5353
): boolean {
@@ -60,7 +60,7 @@ export function areWorkletClosuresEqual(
6060
);
6161
}
6262

63-
export function areWorkletsEqual(
63+
function areWorkletsEqual(
6464
next: WorkletFunction,
6565
prev: WorkletFunction
6666
): boolean {

packages/react-native-reanimated/src/mutablesBase.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ export function checkInvalidWriteDuringRender() {
2929
}
3030
}
3131

32-
export type Listener<TValue> = (newValue: TValue) => void;
32+
type Listener<TValue> = (newValue: TValue) => void;
3333

34-
export type PartialMutable<TValue> = Omit<Mutable<TValue>, 'get' | 'set'>;
34+
type PartialMutable<TValue> = Omit<Mutable<TValue>, 'get' | 'set'>;
3535

3636
/**
3737
* Adds `get` and `set` methods to the mutable object to handle access to

0 commit comments

Comments
 (0)