Skip to content

Commit 73227bf

Browse files
committed
Update type information for new blockPosition param
1 parent 8db6e7f commit 73227bf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

index.d.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
/**
22
* Smooth scrolling onClick event handler
33
* @param {string} selector argument will be passed to `querySelector`, usually an HTML id
4+
* @param {string} [blockPosition='start'] argument will be used to determine position where will be scrolled to
45
* @returns {boolean} false if `document.querySelector` doesn't find a match, otherwise true
56
*/
6-
declare const scrollTo: (selector: string) => boolean;
7+
declare const scrollTo: (
8+
selector: string,
9+
blockPosition?: 'start' | 'center' | 'end' | 'nearest'
10+
) => boolean;
711
export default scrollTo;

0 commit comments

Comments
 (0)