-
Notifications
You must be signed in to change notification settings - Fork 108
Closed
Labels
Description
Here are the contents of ReactConfetti.d.ts
:
import React, { CanvasHTMLAttributes, NamedExoticComponent } from 'react';
import { IConfettiOptions } from './Confetti';
export declare type Ref = HTMLCanvasElement;
export declare type Props = Partial<IConfettiOptions> & NamedExoticComponent & CanvasHTMLAttributes<HTMLCanvasElement> & {
canvasRef: React.RefObject<HTMLCanvasElement>;
};
export declare const ReactConfetti: React.ForwardRefExoticComponent<Partial<IConfettiOptions> & React.NamedExoticComponent<{}> & React.CanvasHTMLAttributes<HTMLCanvasElement> & {
canvasRef: React.RefObject<HTMLCanvasElement>;
} & React.RefAttributes<HTMLCanvasElement>>;
export default ReactConfetti;
Because Props
includes & NamedExoticComponent
, this code:
const wat = <ReactConfetti
width={width}
height={height}
recycle={recycle}
/>
...gives this TypeScript complaint:
Property '$$typeof' is missing in type '{ width: number | undefined; height: number | undefined; recycle: boolean; }' but required in type 'NamedExoticComponent<{}>'.ts(2741)
😭.