Skip to content

Commit

Permalink
Type fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
MatiPl01 committed Aug 12, 2024
1 parent 7768039 commit 916756d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions apps/common-app/src/examples/EmptyExample.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { Text, StyleSheet, View } from 'react-native';

import React from 'react';
import { useSharedValue } from 'react-native-reanimated';

export default function EmptyExample() {
useSharedValue(0);
return (
<View style={styles.container}>
<Text>Hello world!</Text>
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native-reanimated/src/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { WorkletStackDetails } from './commonTypes';

export interface ReanimatedError extends Error {
// eslint-disable-next-line @typescript-eslint/no-misused-new
new (message?: string): ReanimatedError;
new (message: string): ReanimatedError;
}

export function ReanimatedError(message: string): ReanimatedError {
Expand Down
3 changes: 2 additions & 1 deletion packages/react-native-reanimated/src/globals.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import type { UpdatePropsManager } from './UpdateProps';
import type { callGuardDEV } from './initializers';
import type { WorkletRuntime } from './runtimes';
import type { RNScreensTurboModuleType } from './screenTransition/commonTypes';
import type { ReanimatedError as ReanimatedErrorFactory } from './errors';

declare global {
var _REANIMATED_IS_REDUCED_MOTION: boolean | undefined;
Expand Down Expand Up @@ -112,5 +113,5 @@ declare global {
shadowNodeWrapper: ShadowNodeWrapper,
propName: string
) => string;
var ReanimatedError: ReanimatedError;
var ReanimatedError: typeof ReanimatedErrorFactory;
}
1 change: 0 additions & 1 deletion packages/react-native-reanimated/src/publicGlobals.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
'use strict';

/* eslint-disable no-var */
export {};

Expand Down

0 comments on commit 916756d

Please sign in to comment.