Skip to content

Export Size type for typescript #292

Closed
@Maximaximum

Description

@Maximaximum

This is not a huge issue, but it would be just a little bit more convenient if the library also exported a Size type within its typings:

export declare interface Size { width: number; height: number; }
export declare type ResizeSensorCallback = (size: Size) => void;

instead of just

export declare type ResizeSensorCallback = (size: { width: number; height: number; }) => void;

The issue is that the type of the ResizeSensorCallback argument sometimes has to be specified explicitly, so this minor change would help to avoid retyping { width: number; height: number; } in such cases

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions