marcj / css-element-queries

CSS Element-Queries aka Container Queries. High-speed element dimension/media queries in valid css.
http://marcj.github.io/css-element-queries/
MIT License
4.27k stars 487 forks source link

fix: correct types declarations align to source code #300

Open JounQin opened 3 years ago

JounQin commented 3 years ago

The following codes are actually incorrect but current types won't complain about it.

import { ElementQueries } from 'css-element-queries/src/ElementQueries'
import { ResizeSensor } from 'css-element-queries/src/ResizeSensor'

They should be like the following:

// by default
import * as ElementQueries from 'css-element-queries/src/ElementQueries'
import * as ResizeSensor from 'css-element-queries/src/ResizeSensor'

// or with `esModuleInterop: true` enabled
import ElementQueries from 'css-element-queries/src/ElementQueries'
import ResizeSensor from 'css-element-queries/src/ResizeSensor'
ghost commented 2 years ago

a nice feature to be validated I think.