buzinas / simple-scrollbar

Very simple and lightweight vanilla javascript library for creating a custom scrollbar cross-browser.
MIT License
575 stars 159 forks source link

prod: add types #51

Closed Beraliv closed 4 years ago

Beraliv commented 6 years ago

Connected to Issue#50

Beraliv commented 6 years ago

Two ways:

declare namespace SimpleScrollBar {
  export function initEl (element: Element): void;
  export function initAll (): void;
  export function moveBar (e: Event): void;
}

export default SimpleScrollBar;

or

export default interface SimpleScrollBar {
  initEl (element: Element): void;
  initAll (): void;
  moveBar (e: Event): void;
}
Beraliv commented 6 years ago

@buzinas what do you think about adding TS?

Beraliv commented 4 years ago

ping @buzinas what do you think?

buzinas commented 4 years ago

Thanks for your contribution! Sorry for taking so long to merge this.