yiminghe / dom-scroll-into-view

scroll dom node into view automatically
156 stars 24 forks source link

Missing type declaration for typescript implementation #9

Open DionoCorbelWebedia opened 3 years ago

DionoCorbelWebedia commented 3 years ago

if we want to integrate dom-scroll-into-view in its typescript code, the scrollIntoView function is not typed. A simple * .d.ts declaration file is missing which would contain `declare module 'dom-scroll-into-view' with module specifications, expected values, returned values ​​... today typescript reports the error

Error:(1, 28) TS7016: Could not find a declaration file for module 'dom-scroll-into-view'. '/node_modules/dom-scroll-into-view/dist-node/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/dom-scroll-into-view` if it exists or add a new declaration (.d.ts) file containing `declare module 'dom-scroll-into-view';`