Skip to content

Commit

Permalink
Add a Size interface to the typings (marcj#293)
Browse files Browse the repository at this point in the history
Co-authored-by: Maksym Kobieliev <[email protected]>
  • Loading branch information
Maximaximum and Maksym Kobieliev authored Jul 3, 2020
1 parent ee21dfe commit 4eae465
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion css-element-queries.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export { ResizeSensor, ResizeSensorCallback } from "./src/ResizeSensor";
export { ResizeSensor, ResizeSensorCallback, Size } from "./src/ResizeSensor";
export { ElementQueries } from './src/ElementQueries';
7 changes: 6 additions & 1 deletion src/ResizeSensor.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
export declare type ResizeSensorCallback = (size: { width: number; height: number; }) => void;
export declare interface Size {
width: number;
height: number;
}

export declare type ResizeSensorCallback = (size: Size) => void;

export declare class ResizeSensor {
/**
Expand Down

0 comments on commit 4eae465

Please sign in to comment.