Skip to content

Commit

Permalink
Update type information for new blockPosition param
Browse files Browse the repository at this point in the history
  • Loading branch information
freddydumont committed Jul 21, 2020
1 parent 8db6e7f commit 73227bf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
/**
* Smooth scrolling onClick event handler
* @param {string} selector argument will be passed to `querySelector`, usually an HTML id
* @param {string} [blockPosition='start'] argument will be used to determine position where will be scrolled to
* @returns {boolean} false if `document.querySelector` doesn't find a match, otherwise true
*/
declare const scrollTo: (selector: string) => boolean;
declare const scrollTo: (
selector: string,
blockPosition?: 'start' | 'center' | 'end' | 'nearest'
) => boolean;
export default scrollTo;

0 comments on commit 73227bf

Please sign in to comment.