chatGPT suggested these and seem to work (use at your own risk, I haven't checked if they're correct) :
declare module 'react-scale-text' {
import * as React from 'react';
interface ScaleTextProps {
/** The minimum font size (in pixels) to be used when scaling down the text */
minFontSize?: number;
/** The maximum font size (in pixels) to be used when scaling up the text */
maxFontSize?: number;
/** Any additional class names to apply to the component */
className?: string;
/** Optional callback function that gets called when the font size changes */
onFontSizeChange?: (fontSize: number) => void;
/** Children components to be rendered inside the ScaleText component */
children: React.ReactNode;
/** If true, only the width of the text will be scaled */
widthOnly?: boolean;
}
export default class ScaleText extends React.Component<ScaleTextProps> {}
}
chatGPT suggested these and seem to work (use at your own risk, I haven't checked if they're correct) :