mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 21:00:01 +08:00
- Updated react-scroll typing to match the new version of react-scroll.
This commit is contained in:
45
react-scroll/react-scroll.d.ts
vendored
45
react-scroll/react-scroll.d.ts
vendored
@@ -1,6 +1,6 @@
|
||||
// Type definitions for redux-immutable v3.0.5
|
||||
// Type definitions for react-scroll
|
||||
// Project: https://github.com/fisshy/react-scroll
|
||||
// Definitions by: Pedro Pereira <https://github.com/oizie>
|
||||
// Definitions by: Ioannis Kokkinidis <www.github.com/sudoplz>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference path="../react/react.d.ts" />
|
||||
@@ -10,6 +10,8 @@ declare module "react-scroll" {
|
||||
|
||||
interface Link extends React.ClassicComponentClass<any> {}
|
||||
interface Element extends React.ClassicComponentClass<any> {}
|
||||
interface Button extends React.ClassicComponentClass<any> {}
|
||||
interface DirectLink extends React.ClassicComponentClass<any> {}
|
||||
|
||||
interface scrollEvnt {
|
||||
register(evtName: string, callback: Function) : void,
|
||||
@@ -24,15 +26,50 @@ declare module "react-scroll" {
|
||||
scrollTo(to: any, animate?: any, duration?: any, offset?: any) : void
|
||||
}
|
||||
|
||||
interface scrollSpy {
|
||||
update() : void
|
||||
}
|
||||
|
||||
interface animateScroll {
|
||||
scrollToTop(options: any) : void,
|
||||
scrollToBottom(options: any) : void,
|
||||
scrollTo(toY: number, options: any) : void,
|
||||
scrollMore(toY: number, options: any) : void,
|
||||
}
|
||||
|
||||
interface directScroller {
|
||||
get() : any
|
||||
}
|
||||
|
||||
interface Helpers {
|
||||
}
|
||||
|
||||
|
||||
|
||||
const Link: Link;
|
||||
const Element: Element;
|
||||
const Events: Events;
|
||||
const scroller: scroller;
|
||||
|
||||
const DirectLink: DirectLink;
|
||||
const Button: Button;
|
||||
|
||||
const scrollSpy: scrollSpy;
|
||||
const directScroller: directScroller;
|
||||
const Helpers: Helpers;
|
||||
const animateScroll: animateScroll;
|
||||
|
||||
|
||||
export {
|
||||
Link,
|
||||
Element,
|
||||
Events,
|
||||
scroller
|
||||
scroller,
|
||||
scrollSpy,
|
||||
directScroller,
|
||||
DirectLink,
|
||||
Button,
|
||||
Helpers,
|
||||
animateScroll
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user