diff --git a/react-scroll/react-scroll-tests.tsx b/react-scroll/react-scroll-tests.tsx new file mode 100644 index 000000000..b39b9681f --- /dev/null +++ b/react-scroll/react-scroll-tests.tsx @@ -0,0 +1,10 @@ +/// +/// + +import * as React from 'react'; +import { Link, Element, scroller } from 'react-scroll'; + +let link = ; +let element = ; + +scroller.scrollTo("test"); \ No newline at end of file diff --git a/react-scroll/react-scroll.d.ts b/react-scroll/react-scroll.d.ts new file mode 100644 index 000000000..fbaf8d3d2 --- /dev/null +++ b/react-scroll/react-scroll.d.ts @@ -0,0 +1,38 @@ +// Type definitions for redux-immutable v3.0.5 +// Project: https://github.com/fisshy/react-scroll +// Definitions by: Pedro Pereira +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module "react-scroll" { + import React = __React + + interface Link extends React.ClassicComponentClass {} + interface Element extends React.ClassicComponentClass {} + + interface scrollEvnt { + register(evtName: string, callback: Function) : void, + remove(evtName: string) : void + } + + interface Events { + scrollEvent: scrollEvnt + } + + interface scroller { + scrollTo(to: any, animate?: any, duration?: any, offset?: any) : void + } + + const Link: Link; + const Element: Element; + const Events: Events; + const scroller: scroller; + + export { + Link, + Element, + Events, + scroller + } +} \ No newline at end of file