Open micha-lmxt opened 3 years ago
Please add children type, and make props optional
good points, it's updated
import React from 'react';
interface Props {
text?: string;
min?: number;
max?: number;
mode?: 'single' | 'multi';
forceSingleModeWidth?: boolean;
throttle?: number;
onReady?: (number) => void;
}
declare module 'react-textfit' {
export declare class Textfit extends React.Component<Props> {}
export default Textfit;
}
Would not this be better? Accounts for children
and more explicitly describes the exports
to be fixed in: DefinitelyTyped/DefinitelyTyped#58461
Add typescript declaration file