diff --git a/types/react-autosuggest/index.d.ts b/types/react-autosuggest/index.d.ts index 7199fefcdb..165262eb39 100644 --- a/types/react-autosuggest/index.d.ts +++ b/types/react-autosuggest/index.d.ts @@ -4,7 +4,6 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.1 - import * as React from 'react'; declare class Autosuggest extends React.Component {} @@ -32,11 +31,11 @@ declare namespace Autosuggest { interface InputProps extends React.HTMLAttributes { value: string; - onChange: (event: React.FormEvent, params?: ChangeEvent) => void; - onBlur?: (event: React.FormEvent, params?: BlurEvent) => void; + onChange(event: React.FormEvent, params?: ChangeEvent): void; + onBlur?(event: React.FormEvent, params?: BlurEvent): void; } - export interface SuggestionSelectedEventData { + interface SuggestionSelectedEventData { method: 'click' | 'enter'; sectionIndex: number | null; suggestion: TSuggestion; @@ -57,23 +56,22 @@ declare namespace Autosuggest { interface AutosuggestProps extends React.Props { suggestions: any[]; - onSuggestionsFetchRequested: (request: SuggestionsFetchRequest) => void; - onSuggestionsClearRequested?: () => void; - getSuggestionValue: (suggestion: any) => any; - renderSuggestion: (suggestion: any, inputValues: InputValues) => JSX.Element; + onSuggestionsFetchRequested(request: SuggestionsFetchRequest): void; + onSuggestionsClearRequested?(): void; + getSuggestionValue(suggestion: any): any; + renderSuggestion(suggestion: any, inputValues: InputValues): JSX.Element; inputProps: InputProps; - onSuggestionSelected?: (event: React.FormEvent, data: SuggestionSelectedEventData) => void; - shouldRenderSuggestions?: (value: string) => boolean; + onSuggestionSelected?(event: React.FormEvent, data: SuggestionSelectedEventData): void; + shouldRenderSuggestions?(value: string): boolean; alwaysRenderSuggestions?: boolean; focusFirstSuggestion?: boolean; focusInputOnSuggestionClick?: boolean; multiSection?: boolean; - renderSectionTitle?: (section: any, inputValues: InputValues) => JSX.Element; - getSectionSuggestions?: (section: any) => any[]; - renderInputComponent?: () => JSX.Element; - renderSuggestionsContainer?: (children: any) => JSX.Element; + renderSectionTitle?(section: any, inputValues: InputValues): JSX.Element; + getSectionSuggestions?(section: any): any[]; + renderInputComponent?(): JSX.Element; + renderSuggestionsContainer?(children: any): JSX.Element; theme?: Theme; id?: string; } - } diff --git a/types/react-body-classname/index.d.ts b/types/react-body-classname/index.d.ts index e20bffdc73..b7f0856df9 100644 --- a/types/react-body-classname/index.d.ts +++ b/types/react-body-classname/index.d.ts @@ -13,4 +13,4 @@ declare class BodyClassName extends React.Component<{ className: string }, any> static displayName: string; static peek(): any; static rewind(): any; -} \ No newline at end of file +} diff --git a/types/react-body-classname/react-body-classname-tests.tsx b/types/react-body-classname/react-body-classname-tests.tsx index 7fb971fe44..019105bee6 100644 --- a/types/react-body-classname/react-body-classname-tests.tsx +++ b/types/react-body-classname/react-body-classname-tests.tsx @@ -23,4 +23,4 @@ class App { // Becuase we nested the component, our body will now have 'app home' // as the class name } -} \ No newline at end of file +} diff --git a/types/react-bootstrap-date-picker/index.d.ts b/types/react-bootstrap-date-picker/index.d.ts index f905dc77a7..28a5b0c72b 100644 --- a/types/react-bootstrap-date-picker/index.d.ts +++ b/types/react-bootstrap-date-picker/index.d.ts @@ -14,10 +14,9 @@ declare const DatePicker: DatePicker; type DatePicker = ComponentClass; declare namespace DatePicker { + type ChangeCallback = (value: string, formattedValue: string) => void; - export type ChangeCallback = (value: string, formattedValue: string) => void; - - export interface DatePickerProps { + interface DatePickerProps { value?: string; defaultValue?: string; style?: any; @@ -30,7 +29,7 @@ declare namespace DatePicker { dateFormat?: string; clearButtonElement?: ReactNode; showClearButton?: boolean; - onClear?: () => void; + onClear?(): void; previousButtonElement?: ReactNode; nextButtonElement?: ReactNode; cellPadding?: string; @@ -43,5 +42,4 @@ declare namespace DatePicker { todayButtonLabel?: string; customControl?: StatelessComponent | ComponentClass; } - } diff --git a/types/react-copy-to-clipboard/index.d.ts b/types/react-copy-to-clipboard/index.d.ts index e4a0948962..67b70b0ad1 100644 --- a/types/react-copy-to-clipboard/index.d.ts +++ b/types/react-copy-to-clipboard/index.d.ts @@ -18,7 +18,7 @@ declare namespace CopyToClipboard { interface Props { text: string; - onCopy?: (a: string) => void; + onCopy?(a: string): void; options?: Options; } } diff --git a/types/react-day-picker/react-day-picker-tests.tsx b/types/react-day-picker/react-day-picker-tests.tsx index 52da9e9735..1733b713dd 100644 --- a/types/react-day-picker/react-day-picker-tests.tsx +++ b/types/react-day-picker/react-day-picker-tests.tsx @@ -47,6 +47,6 @@ class CaptionElement extends React.Component { { localeUtils.formatMonthTitle(date, locale) } ); - }; + } } }/>; diff --git a/types/react-dnd-html5-backend/react-dnd-html5-backend-tests.ts b/types/react-dnd-html5-backend/react-dnd-html5-backend-tests.ts index 68703d062d..198909b7e9 100644 --- a/types/react-dnd-html5-backend/react-dnd-html5-backend-tests.ts +++ b/types/react-dnd-html5-backend/react-dnd-html5-backend-tests.ts @@ -4,7 +4,7 @@ import React = require("react"); import ReactDnd = require("react-dnd"); -var r = React.DOM; +const r = React.DOM; import DragSource = ReactDnd.DragSource; import DropTarget = ReactDnd.DropTarget; @@ -15,8 +15,8 @@ import HTML5Backend, { getEmptyImage } from 'react-dnd-html5-backend'; // ---------------------------------------------------------------------- namespace Game { - var knightPosition = [0, 0]; - var observer: any = null; + let knightPosition = [0, 0]; + let observer: any = null; function emitChange() { observer(knightPosition); @@ -47,7 +47,7 @@ namespace Game { } } -var ItemTypes = { +const ItemTypes = { KNIGHT: "knight" }; @@ -61,7 +61,7 @@ namespace Knight { isDragging: boolean; } - var knightSource: ReactDnd.DragSourceSpec = { + const knightSource: ReactDnd.DragSourceSpec = { beginDrag: (props) => { return {}; } @@ -81,7 +81,7 @@ namespace Knight { static create = React.createFactory(Knight); componentDidMount() { - var img = getEmptyImage(); + const img = getEmptyImage(); img.onload = () => this.props.connectDragPreview(img); } @@ -99,8 +99,8 @@ namespace Knight { } } - export var DndKnight = DragSource(ItemTypes.KNIGHT, knightSource, knightCollect)(Knight); - export var create = React.createFactory(DndKnight); + export const DndKnight = DragSource(ItemTypes.KNIGHT, knightSource, knightCollect)(Knight); + export const create = React.createFactory(DndKnight); } // Square Component @@ -113,7 +113,7 @@ namespace Square { export class Square extends React.Component { render() { - var fill = this.props.black ? 'black' : 'white'; + const fill = this.props.black ? 'black' : 'white'; return r.div({ style: { backgroundColor: fill @@ -122,7 +122,7 @@ namespace Square { } } - export var create = React.createFactory(Square); + export const create = React.createFactory(Square); } // BoardSquare Component @@ -137,7 +137,7 @@ namespace BoardSquare { canDrop?: boolean; } - var boardSquareTarget: ReactDnd.DropTargetSpec = { + const boardSquareTarget: ReactDnd.DropTargetSpec = { canDrop: (props) => Game.canMoveKnight(props.x, props.y), drop: (props) => Game.moveKnight(props.x, props.y) }; @@ -169,9 +169,9 @@ namespace BoardSquare { } render() { - var black = (this.props.x + this.props.y) % 2 === 1; - var isOver = this.props.isOver; - var canDrop = this.props.canDrop; + const black = (this.props.x + this.props.y) % 2 === 1; + const isOver = this.props.isOver; + const canDrop = this.props.canDrop; return this.props.connectDropTarget( r.div({ @@ -191,8 +191,8 @@ namespace BoardSquare { } } - export var DndBoardSquare = DropTarget(ItemTypes.KNIGHT, boardSquareTarget, boardSquareCollect)(BoardSquare); - export var create = React.createFactory(DndBoardSquare); + export const DndBoardSquare = DropTarget(ItemTypes.KNIGHT, boardSquareTarget, boardSquareCollect)(BoardSquare); + export const create = React.createFactory(DndBoardSquare); } // Custom Drag Layer Component @@ -216,9 +216,9 @@ namespace CustomDragLayer { } } - export var dragLayer = DragLayer(dragLayerCollect)(CustomDragLayer); + export const dragLayer = DragLayer(dragLayerCollect)(CustomDragLayer); - export var create = React.createFactory(dragLayer); + export const create = React.createFactory(dragLayer); } // Board Component @@ -231,16 +231,16 @@ namespace Board { export class Board extends React.Component { private _renderPiece = (x: number, y: number) => { - var knightX = this.props.knightPosition[0]; - var knightY = this.props.knightPosition[1]; + const knightX = this.props.knightPosition[0]; + const knightY = this.props.knightPosition[1]; return x === knightX && y === knightY ? Knight.create() : null; } private _renderSquare = (i: number) => { - var x = i % 8; - var y = Math.floor(i / 8); + const x = i % 8; + const y = Math.floor(i / 8); return r.div({ key: i, @@ -252,7 +252,7 @@ namespace Board { } render() { - var squares: Array> = []; + const squares: Array> = []; for (let i = 0; i < 64; i++) { squares.push(this._renderSquare(i)); } @@ -274,7 +274,7 @@ namespace Board { } } - export var createWithHTMLBackend = React.createFactory(DragDropContext(HTML5Backend)(Board)); + export const createWithHTMLBackend = React.createFactory(DragDropContext(HTML5Backend)(Board)); } // Render the Board Component diff --git a/types/react-event-listener/index.d.ts b/types/react-event-listener/index.d.ts index c6d05b313b..906e3711e0 100644 --- a/types/react-event-listener/index.d.ts +++ b/types/react-event-listener/index.d.ts @@ -21,188 +21,188 @@ export function withOptions(handler: (ev: T) => any, options: EventOptions): export interface EventListenerProps { // Global events - onPointerCancel?: (ev: PointerEvent) => any; - onPointerCancelCapture?: (ev: PointerEvent) => any; - onPointerDown?: (ev: PointerEvent) => any; - onPointerDownCapture?: (ev: PointerEvent) => any; - onPointerEnter?: (ev: PointerEvent) => any; - onPointerEnterCapture?: (ev: PointerEvent) => any; - onPointerLeave?: (ev: PointerEvent) => any; - onPointerLeaveCapture?: (ev: PointerEvent) => any; - onPointerMove?: (ev: PointerEvent) => any; - onPointerMoveCapture?: (ev: PointerEvent) => any; - onPointerOut?: (ev: PointerEvent) => any; - onPointerOutCapture?: (ev: PointerEvent) => any; - onPointerOver?: (ev: PointerEvent) => any; - onPointerOverCapture?: (ev: PointerEvent) => any; - onPointerUp?: (ev: PointerEvent) => any; - onPointerUpCapture?: (ev: PointerEvent) => any; - onWheel?: (ev: WheelEvent) => any; - onWheelCapture?: (ev: WheelEvent) => any; - onAbort?: (ev: Event) => any; - onAbortCapture?: (ev: Event) => any; - onAfterPrint?: (ev: Event) => any; - onAfterPrintCapture?: (ev: Event) => any; - onBeforePrint?: (ev: Event) => any; - onBeforePrintCapture?: (ev: Event) => any; - onBeforeUnload?: (ev: BeforeUnloadEvent) => any; - onBeforeUnloadCapture?: (ev: BeforeUnloadEvent) => any; - onBlur?: (ev: FocusEvent) => any; - onBlurCapture?: (ev: FocusEvent) => any; - onCanPlay?: (ev: Event) => any; - onCanPlayCapture?: (ev: Event) => any; - onCanPlayThrough?: (ev: Event) => any; - onCanPlayThroughCapture?: (ev: Event) => any; - onChange?: (ev: Event) => any; - onChangeCapture?: (ev: Event) => any; - onClick?: (ev: MouseEvent) => any; - onClickCapture?: (ev: MouseEvent) => any; - onCompassNeedsCalibration?: (ev: Event) => any; - onCompassNeedsCalibrationCapture?: (ev: Event) => any; - onContextMenu?: (ev: PointerEvent) => any; - onContextMenuCapture?: (ev: PointerEvent) => any; - onDblClick?: (ev: MouseEvent) => any; - onDblClickCapture?: (ev: MouseEvent) => any; - onDeviceMotion?: (ev: DeviceMotionEvent) => any; - onDeviceMotionCapture?: (ev: DeviceMotionEvent) => any; - onDeviceOrientation?: (ev: DeviceOrientationEvent) => any; - onDeviceOrientationCapture?: (ev: DeviceOrientationEvent) => any; - onDrag?: (ev: DragEvent) => any; - onDragCapture?: (ev: DragEvent) => any; - onDragEnd?: (ev: DragEvent) => any; - onDragEndCapture?: (ev: DragEvent) => any; - onDragEnter?: (ev: DragEvent) => any; - onDragEnterCapture?: (ev: DragEvent) => any; - onDragLeave?: (ev: DragEvent) => any; - onDragLeaveCapture?: (ev: DragEvent) => any; - onDragOver?: (ev: DragEvent) => any; - onDragOverCapture?: (ev: DragEvent) => any; - onDragStart?: (ev: DragEvent) => any; - onDragStartCapture?: (ev: DragEvent) => any; - onDrop?: (ev: DragEvent) => any; - onDropCapture?: (ev: DragEvent) => any; - onDurationChange?: (ev: Event) => any; - onDurationChangeCapture?: (ev: Event) => any; - onEmptied?: (ev: Event) => any; - onEmptiedCapture?: (ev: Event) => any; - onEnded?: (ev: Event) => any; - onEndedCapture?: (ev: Event) => any; + onPointerCancel?(ev: PointerEvent): any; + onPointerCancelCapture?(ev: PointerEvent): any; + onPointerDown?(ev: PointerEvent): any; + onPointerDownCapture?(ev: PointerEvent): any; + onPointerEnter?(ev: PointerEvent): any; + onPointerEnterCapture?(ev: PointerEvent): any; + onPointerLeave?(ev: PointerEvent): any; + onPointerLeaveCapture?(ev: PointerEvent): any; + onPointerMove?(ev: PointerEvent): any; + onPointerMoveCapture?(ev: PointerEvent): any; + onPointerOut?(ev: PointerEvent): any; + onPointerOutCapture?(ev: PointerEvent): any; + onPointerOver?(ev: PointerEvent): any; + onPointerOverCapture?(ev: PointerEvent): any; + onPointerUp?(ev: PointerEvent): any; + onPointerUpCapture?(ev: PointerEvent): any; + onWheel?(ev: WheelEvent): any; + onWheelCapture?(ev: WheelEvent): any; + onAbort?(ev: Event): any; + onAbortCapture?(ev: Event): any; + onAfterPrint?(ev: Event): any; + onAfterPrintCapture?(ev: Event): any; + onBeforePrint?(ev: Event): any; + onBeforePrintCapture?(ev: Event): any; + onBeforeUnload?(ev: BeforeUnloadEvent): any; + onBeforeUnloadCapture?(ev: BeforeUnloadEvent): any; + onBlur?(ev: FocusEvent): any; + onBlurCapture?(ev: FocusEvent): any; + onCanPlay?(ev: Event): any; + onCanPlayCapture?(ev: Event): any; + onCanPlayThrough?(ev: Event): any; + onCanPlayThroughCapture?(ev: Event): any; + onChange?(ev: Event): any; + onChangeCapture?(ev: Event): any; + onClick?(ev: MouseEvent): any; + onClickCapture?(ev: MouseEvent): any; + onCompassNeedsCalibration?(ev: Event): any; + onCompassNeedsCalibrationCapture?(ev: Event): any; + onContextMenu?(ev: PointerEvent): any; + onContextMenuCapture?(ev: PointerEvent): any; + onDblClick?(ev: MouseEvent): any; + onDblClickCapture?(ev: MouseEvent): any; + onDeviceMotion?(ev: DeviceMotionEvent): any; + onDeviceMotionCapture?(ev: DeviceMotionEvent): any; + onDeviceOrientation?(ev: DeviceOrientationEvent): any; + onDeviceOrientationCapture?(ev: DeviceOrientationEvent): any; + onDrag?(ev: DragEvent): any; + onDragCapture?(ev: DragEvent): any; + onDragEnd?(ev: DragEvent): any; + onDragEndCapture?(ev: DragEvent): any; + onDragEnter?(ev: DragEvent): any; + onDragEnterCapture?(ev: DragEvent): any; + onDragLeave?(ev: DragEvent): any; + onDragLeaveCapture?(ev: DragEvent): any; + onDragOver?(ev: DragEvent): any; + onDragOverCapture?(ev: DragEvent): any; + onDragStart?(ev: DragEvent): any; + onDragStartCapture?(ev: DragEvent): any; + onDrop?(ev: DragEvent): any; + onDropCapture?(ev: DragEvent): any; + onDurationChange?(ev: Event): any; + onDurationChangeCapture?(ev: Event): any; + onEmptied?(ev: Event): any; + onEmptiedCapture?(ev: Event): any; + onEnded?(ev: Event): any; + onEndedCapture?(ev: Event): any; onError?: ErrorEventHandler; onErrorCapture?: ErrorEventHandler; - onFocus?: (ev: FocusEvent) => any; - onFocusCapture?: (ev: FocusEvent) => any; - onHashChange?: (ev: HashChangeEvent) => any; - onHashChangeCapture?: (ev: HashChangeEvent) => any; - onInput?: (ev: Event) => any; - onInputCapture?: (ev: Event) => any; - onKeyDown?: (ev: KeyboardEvent) => any; - onKeyDownCapture?: (ev: KeyboardEvent) => any; - onKeyPress?: (ev: KeyboardEvent) => any; - onKeyPressCapture?: (ev: KeyboardEvent) => any; - onKeyUp?: (ev: KeyboardEvent) => any; - onKeyUpCapture?: (ev: KeyboardEvent) => any; - onLoad?: (ev: Event) => any; - onLoadCapture?: (ev: Event) => any; - onLoadedData?: (ev: Event) => any; - onLoadedDataCapture?: (ev: Event) => any; - onLoadedMetadata?: (ev: Event) => any; - onLoadedMetadataCapture?: (ev: Event) => any; - onLoadStart?: (ev: Event) => any; - onLoadStartCapture?: (ev: Event) => any; - onMessage?: (ev: MessageEvent) => any; - onMessageCapture?: (ev: MessageEvent) => any; - onMouseDown?: (ev: MouseEvent) => any; - onMouseDownCapture?: (ev: MouseEvent) => any; - onMouseEnter?: (ev: MouseEvent) => any; - onMouseEnterCapture?: (ev: MouseEvent) => any; - onMouseLeave?: (ev: MouseEvent) => any; - onMouseLeaveCapture?: (ev: MouseEvent) => any; - onMouseMove?: (ev: MouseEvent) => any; - onMouseMoveCapture?: (ev: MouseEvent) => any; - onMouseOut?: (ev: MouseEvent) => any; - onMouseOutCapture?: (ev: MouseEvent) => any; - onMouseOver?: (ev: MouseEvent) => any; - onMouseOverCapture?: (ev: MouseEvent) => any; - onMouseUp?: (ev: MouseEvent) => any; - onMouseUpCapture?: (ev: MouseEvent) => any; - onMouseWheel?: (ev: MouseWheelEvent) => any; - onMouseWheelCapture?: (ev: MouseWheelEvent) => any; - onMsGestureChange?: (ev: MSGestureEvent) => any; - onMsGestureChangeCapture?: (ev: MSGestureEvent) => any; - onMsGestureDoubleTap?: (ev: MSGestureEvent) => any; - onMsGestureDoubleTapCapture?: (ev: MSGestureEvent) => any; - onMsGestureEnd?: (ev: MSGestureEvent) => any; - onMsGestureEndCapture?: (ev: MSGestureEvent) => any; - onMsGestureHold?: (ev: MSGestureEvent) => any; - onMsGestureHoldCapture?: (ev: MSGestureEvent) => any; - onMsGestureStart?: (ev: MSGestureEvent) => any; - onMsGestureStartCapture?: (ev: MSGestureEvent) => any; - onMsGestureTap?: (ev: MSGestureEvent) => any; - onMsGestureTapCapture?: (ev: MSGestureEvent) => any; - onMsInertiaStart?: (ev: MSGestureEvent) => any; - onMsInertiaStartCapture?: (ev: MSGestureEvent) => any; - onMsPointerCancel?: (ev: MSPointerEvent) => any; - onMsPointerCancelCapture?: (ev: MSPointerEvent) => any; - onMsPointerDown?: (ev: MSPointerEvent) => any; - onMsPointerDownCapture?: (ev: MSPointerEvent) => any; - onMsPointerEnter?: (ev: MSPointerEvent) => any; - onMsPointerEnterCapture?: (ev: MSPointerEvent) => any; - onMsPointerLeave?: (ev: MSPointerEvent) => any; - onMsPointerLeaveCapture?: (ev: MSPointerEvent) => any; - onMsPointerMove?: (ev: MSPointerEvent) => any; - onMsPointerMoveCapture?: (ev: MSPointerEvent) => any; - onMsPointerOut?: (ev: MSPointerEvent) => any; - onMsPointerOutCapture?: (ev: MSPointerEvent) => any; - onMsPointerOver?: (ev: MSPointerEvent) => any; - onMsPointerOverCapture?: (ev: MSPointerEvent) => any; - oNmsPointerUp?: (ev: MSPointerEvent) => any; - oNmsPointerUpCapture?: (ev: MSPointerEvent) => any; - onOffline?: (ev: Event) => any; - onOfflineCapture?: (ev: Event) => any; - onOnline?: (ev: Event) => any; - onOnlineCapture?: (ev: Event) => any; - onOrientationChange?: (ev: Event) => any; - onOrientationChangeCapture?: (ev: Event) => any; - onPageHide?: (ev: PageTransitionEvent) => any; - onPageHideCapture?: (ev: PageTransitionEvent) => any; - onPageShow?: (ev: PageTransitionEvent) => any; - onPageShowCapture?: (ev: PageTransitionEvent) => any; - onPause?: (ev: Event) => any; - onPauseCapture?: (ev: Event) => any; - onPlay?: (ev: Event) => any; - onPlayCapture?: (ev: Event) => any; - onPlaying?: (ev: Event) => any; - onPlayingCapture?: (ev: Event) => any; - onPopState?: (ev: PopStateEvent) => any; - onPopStateCapture?: (ev: PopStateEvent) => any; - onProgress?: (ev: ProgressEvent) => any; - onProgressCapture?: (ev: ProgressEvent) => any; - onRateChange?: (ev: Event) => any; - onRateChangeCapture?: (ev: Event) => any; - onReadyStateChange?: (ev: ProgressEvent) => any; - onReadyStateChangeCapture?: (ev: ProgressEvent) => any; - onReset?: (ev: Event) => any; - onResetCapture?: (ev: Event) => any; - onResize?: (ev: UIEvent) => any; - onResizeCapture?: (ev: UIEvent) => any; - onScroll?: (ev: UIEvent) => any; - onScrollCapture?: (ev: UIEvent) => any; - onSeeked?: (ev: Event) => any; - onSeekedCapture?: (ev: Event) => any; - onSeeking?: (ev: Event) => any; - onSeekingCapture?: (ev: Event) => any; - onSelect?: (ev: UIEvent) => any; - onSelectCapture?: (ev: UIEvent) => any; - onStalled?: (ev: Event) => any; - onStalledCapture?: (ev: Event) => any; - onStorage?: (ev: StorageEvent) => any; - onStorageCapture?: (ev: StorageEvent) => any; - onSubmit?: (ev: Event) => any; - onSubmitCapture?: (ev: Event) => any; - onSuspend?: (ev: Event) => any; - onSuspendCapture?: (ev: Event) => any; - onTimeUpdate?: (ev: Event) => any; - onTimeUpdateCapture?: (ev: Event) => any; + onFocus?(ev: FocusEvent): any; + onFocusCapture?(ev: FocusEvent): any; + onHashChange?(ev: HashChangeEvent): any; + onHashChangeCapture?(ev: HashChangeEvent): any; + onInput?(ev: Event): any; + onInputCapture?(ev: Event): any; + onKeyDown?(ev: KeyboardEvent): any; + onKeyDownCapture?(ev: KeyboardEvent): any; + onKeyPress?(ev: KeyboardEvent): any; + onKeyPressCapture?(ev: KeyboardEvent): any; + onKeyUp?(ev: KeyboardEvent): any; + onKeyUpCapture?(ev: KeyboardEvent): any; + onLoad?(ev: Event): any; + onLoadCapture?(ev: Event): any; + onLoadedData?(ev: Event): any; + onLoadedDataCapture?(ev: Event): any; + onLoadedMetadata?(ev: Event): any; + onLoadedMetadataCapture?(ev: Event): any; + onLoadStart?(ev: Event): any; + onLoadStartCapture?(ev: Event): any; + onMessage?(ev: MessageEvent): any; + onMessageCapture?(ev: MessageEvent): any; + onMouseDown?(ev: MouseEvent): any; + onMouseDownCapture?(ev: MouseEvent): any; + onMouseEnter?(ev: MouseEvent): any; + onMouseEnterCapture?(ev: MouseEvent): any; + onMouseLeave?(ev: MouseEvent): any; + onMouseLeaveCapture?(ev: MouseEvent): any; + onMouseMove?(ev: MouseEvent): any; + onMouseMoveCapture?(ev: MouseEvent): any; + onMouseOut?(ev: MouseEvent): any; + onMouseOutCapture?(ev: MouseEvent): any; + onMouseOver?(ev: MouseEvent): any; + onMouseOverCapture?(ev: MouseEvent): any; + onMouseUp?(ev: MouseEvent): any; + onMouseUpCapture?(ev: MouseEvent): any; + onMouseWheel?(ev: MouseWheelEvent): any; + onMouseWheelCapture?(ev: MouseWheelEvent): any; + onMsGestureChange?(ev: MSGestureEvent): any; + onMsGestureChangeCapture?(ev: MSGestureEvent): any; + onMsGestureDoubleTap?(ev: MSGestureEvent): any; + onMsGestureDoubleTapCapture?(ev: MSGestureEvent): any; + onMsGestureEnd?(ev: MSGestureEvent): any; + onMsGestureEndCapture?(ev: MSGestureEvent): any; + onMsGestureHold?(ev: MSGestureEvent): any; + onMsGestureHoldCapture?(ev: MSGestureEvent): any; + onMsGestureStart?(ev: MSGestureEvent): any; + onMsGestureStartCapture?(ev: MSGestureEvent): any; + onMsGestureTap?(ev: MSGestureEvent): any; + onMsGestureTapCapture?(ev: MSGestureEvent): any; + onMsInertiaStart?(ev: MSGestureEvent): any; + onMsInertiaStartCapture?(ev: MSGestureEvent): any; + onMsPointerCancel?(ev: MSPointerEvent): any; + onMsPointerCancelCapture?(ev: MSPointerEvent): any; + onMsPointerDown?(ev: MSPointerEvent): any; + onMsPointerDownCapture?(ev: MSPointerEvent): any; + onMsPointerEnter?(ev: MSPointerEvent): any; + onMsPointerEnterCapture?(ev: MSPointerEvent): any; + onMsPointerLeave?(ev: MSPointerEvent): any; + onMsPointerLeaveCapture?(ev: MSPointerEvent): any; + onMsPointerMove?(ev: MSPointerEvent): any; + onMsPointerMoveCapture?(ev: MSPointerEvent): any; + onMsPointerOut?(ev: MSPointerEvent): any; + onMsPointerOutCapture?(ev: MSPointerEvent): any; + onMsPointerOver?(ev: MSPointerEvent): any; + onMsPointerOverCapture?(ev: MSPointerEvent): any; + oNmsPointerUp?(ev: MSPointerEvent): any; + oNmsPointerUpCapture?(ev: MSPointerEvent): any; + onOffline?(ev: Event): any; + onOfflineCapture?(ev: Event): any; + onOnline?(ev: Event): any; + onOnlineCapture?(ev: Event): any; + onOrientationChange?(ev: Event): any; + onOrientationChangeCapture?(ev: Event): any; + onPageHide?(ev: PageTransitionEvent): any; + onPageHideCapture?(ev: PageTransitionEvent): any; + onPageShow?(ev: PageTransitionEvent): any; + onPageShowCapture?(ev: PageTransitionEvent): any; + onPause?(ev: Event): any; + onPauseCapture?(ev: Event): any; + onPlay?(ev: Event): any; + onPlayCapture?(ev: Event): any; + onPlaying?(ev: Event): any; + onPlayingCapture?(ev: Event): any; + onPopState?(ev: PopStateEvent): any; + onPopStateCapture?(ev: PopStateEvent): any; + onProgress?(ev: ProgressEvent): any; + onProgressCapture?(ev: ProgressEvent): any; + onRateChange?(ev: Event): any; + onRateChangeCapture?(ev: Event): any; + onReadyStateChange?(ev: ProgressEvent): any; + onReadyStateChangeCapture?(ev: ProgressEvent): any; + onReset?(ev: Event): any; + onResetCapture?(ev: Event): any; + onResize?(ev: UIEvent): any; + onResizeCapture?(ev: UIEvent): any; + onScroll?(ev: UIEvent): any; + onScrollCapture?(ev: UIEvent): any; + onSeeked?(ev: Event): any; + onSeekedCapture?(ev: Event): any; + onSeeking?(ev: Event): any; + onSeekingCapture?(ev: Event): any; + onSelect?(ev: UIEvent): any; + onSelectCapture?(ev: UIEvent): any; + onStalled?(ev: Event): any; + onStalledCapture?(ev: Event): any; + onStorage?(ev: StorageEvent): any; + onStorageCapture?(ev: StorageEvent): any; + onSubmit?(ev: Event): any; + onSubmitCapture?(ev: Event): any; + onSuspend?(ev: Event): any; + onSuspendCapture?(ev: Event): any; + onTimeUpdate?(ev: Event): any; + onTimeUpdateCapture?(ev: Event): any; onTouchCancel?: any; onTouchCancelCapture?: any; onTouchEnd?: any; @@ -211,12 +211,12 @@ export interface EventListenerProps { onTouchMoveCapture?: any; onTouchStart?: any; onTouchStartCapture?: any; - onUnload?: (ev: Event) => any; - onUnloadCapture?: (ev: Event) => any; - onVolumeChange?: (ev: Event) => any; - onVolumeChangeCapture?: (ev: Event) => any; - onWaiting?: (ev: Event) => any; - onWaitingCapture?: (ev: Event) => any; + onUnload?(ev: Event): any; + onUnloadCapture?(ev: Event): any; + onVolumeChange?(ev: Event): any; + onVolumeChangeCapture?(ev: Event): any; + onWaiting?(ev: Event): any; + onWaitingCapture?(ev: Event): any; /** * Target (window or document) diff --git a/types/react-facebook-login/index.d.ts b/types/react-facebook-login/index.d.ts index 577846e4a5..9f83d7ae8b 100644 --- a/types/react-facebook-login/index.d.ts +++ b/types/react-facebook-login/index.d.ts @@ -9,7 +9,7 @@ import * as React from "react"; declare namespace ReactFacebookLogin { interface ReactFacebookLoginProps { appId: string; - callback: (userInfo: ReactFacebookLoginInfo) => void; + callback(userInfo: ReactFacebookLoginInfo): void; autoLoad?: boolean; buttonStyle?: React.CSSProperties; @@ -21,7 +21,7 @@ declare namespace ReactFacebookLogin { icon?: string | React.ReactNode; isDisabled?: boolean; language?: string; - onClick?: () => void; + onClick?(): void; reAuthenticate?: boolean; redirectUri?: string; scope?: string; diff --git a/types/react-gravatar/index.d.ts b/types/react-gravatar/index.d.ts index 3e33584a4b..9307c6fb93 100644 --- a/types/react-gravatar/index.d.ts +++ b/types/react-gravatar/index.d.ts @@ -22,10 +22,10 @@ declare class Gravatar extends React.Component { } declare namespace Gravatar { - export type DefaultImage = "404" | "mm" | "identicon" | "monsterid" | "wavatar" | "retro" | "blank"; - export type Rating = "g" | "pg" | "r" | "x"; + type DefaultImage = "404" | "mm" | "identicon" | "monsterid" | "wavatar" | "retro" | "blank"; + type Rating = "g" | "pg" | "r" | "x"; - export interface Props { + interface Props { /** * The email address used to look up the Gravatar image. * If you wish to avoid sending an email address to the client, you can compute the md5 hash on the server and diff --git a/types/react-gravatar/react-gravatar-tests.tsx b/types/react-gravatar/react-gravatar-tests.tsx index e3b36b7259..1dee72f2c9 100644 --- a/types/react-gravatar/react-gravatar-tests.tsx +++ b/types/react-gravatar/react-gravatar-tests.tsx @@ -37,4 +37,4 @@ class GravatarMinimalTest extends React.Component { render() { return ; } -} \ No newline at end of file +} diff --git a/types/react-highlight-words/index.d.ts b/types/react-highlight-words/index.d.ts index aae2eff04e..220c245638 100644 --- a/types/react-highlight-words/index.d.ts +++ b/types/react-highlight-words/index.d.ts @@ -22,7 +22,7 @@ interface HighlighterProps { /** Type of tag to wrap around highlighted matches; defaults to mark */ highlightTag?: string; /** Process each search word and text to highlight before comparing (eg remove accents); signature (text: string): string */ - sanitize?: (text: string) => string; + sanitize?(text: string): string; /** Array of search words */ searchWords: string[]; /** Text to highlight matches in */ diff --git a/types/react-highlighter/react-highlighter-tests.tsx b/types/react-highlighter/react-highlighter-tests.tsx index 9065bd1fab..79760228dd 100644 --- a/types/react-highlighter/react-highlighter-tests.tsx +++ b/types/react-highlighter/react-highlighter-tests.tsx @@ -10,4 +10,4 @@ export class ReactHolderTest extends React.Component { ); } -} \ No newline at end of file +} diff --git a/types/react-icon-base/index.d.ts b/types/react-icon-base/index.d.ts index c0246569f6..600d33dff7 100644 --- a/types/react-icon-base/index.d.ts +++ b/types/react-icon-base/index.d.ts @@ -12,6 +12,4 @@ export interface IconBaseProps { style?: React.CSSProperties; } -export default class IconBase extends React.Component { - -} \ No newline at end of file +export default class IconBase extends React.Component {} diff --git a/types/react-icon-base/react-icon-base-tests.tsx b/types/react-icon-base/react-icon-base-tests.tsx index 68388f69d6..16ebafd133 100644 --- a/types/react-icon-base/react-icon-base-tests.tsx +++ b/types/react-icon-base/react-icon-base-tests.tsx @@ -1,4 +1,4 @@ import * as React from 'react'; import IconBase from 'react-icon-base'; -export default ; \ No newline at end of file +export default ; diff --git a/types/react-icons/react-icons-tests.tsx b/types/react-icons/react-icons-tests.tsx index 0c37cc9da2..1cb773fb4d 100644 --- a/types/react-icons/react-icons-tests.tsx +++ b/types/react-icons/react-icons-tests.tsx @@ -7,5 +7,3 @@ class Question extends React.Component { return

Lets go for a ?

; } } - - diff --git a/types/react-icons/tslint.json b/types/react-icons/tslint.json index 377cc837d4..05b3b474eb 100644 --- a/types/react-icons/tslint.json +++ b/types/react-icons/tslint.json @@ -1 +1,8 @@ -{ "extends": "../tslint.json" } +{ + "extends": "../tslint.json", + "rules": { + "eofline": false, + "no-useless-files": false, + "no-var": false + } +} diff --git a/types/react-input-mask/index.d.ts b/types/react-input-mask/index.d.ts index fe6cc718e4..560dc8cc2b 100644 --- a/types/react-input-mask/index.d.ts +++ b/types/react-input-mask/index.d.ts @@ -7,7 +7,7 @@ import * as React from "react"; declare namespace reactInputMask { - export interface ReactInputMaskProps extends React.HTMLAttributes { + interface ReactInputMaskProps extends React.HTMLAttributes { /** * Mask string. Format characters are: * * `9`: `0-9` @@ -37,7 +37,7 @@ declare namespace reactInputMask { */ alwaysShowMask?: boolean; } - export class ReactInputMask extends React.Component { + class ReactInputMask extends React.Component { } } declare var ReactInputMask: typeof reactInputMask.ReactInputMask; diff --git a/types/react-joyride/index.d.ts b/types/react-joyride/index.d.ts index 1a6d674ed4..ebc086770b 100644 --- a/types/react-joyride/index.d.ts +++ b/types/react-joyride/index.d.ts @@ -130,7 +130,7 @@ interface Props { /** * It will be called when the tour's state changes. */ - callback?: (options: any) => void; + callback?(options: any): void; } export interface Step { diff --git a/types/react-json-pretty/index.d.ts b/types/react-json-pretty/index.d.ts index bf165faaf5..00f3f8b4ff 100644 --- a/types/react-json-pretty/index.d.ts +++ b/types/react-json-pretty/index.d.ts @@ -14,9 +14,7 @@ declare const JSONPretty: JSONPretty; type JSONPretty = ComponentClass; declare namespace JSONPretty { - - export interface JSONPrettyProps extends HTMLProps { + interface JSONPrettyProps extends HTMLProps { json: {} | string; } - } diff --git a/types/react-leaflet/index.d.ts b/types/react-leaflet/index.d.ts index 8caed9e4e1..9414e11f77 100644 --- a/types/react-leaflet/index.d.ts +++ b/types/react-leaflet/index.d.ts @@ -11,59 +11,59 @@ import * as React from 'react'; // which already declares things with some of the same names interface LeafletLayerEvents { - onbaselayerchange?: (event: Leaflet.LayersControlEvent) => void; - onoverlayadd?: (event: Leaflet.LayersControlEvent) => void; - onoverlayremove?: (event: Leaflet.LayersControlEvent) => void; - onlayeradd?: (event: Leaflet.LayerEvent) => void; - onlayerremove?: (event: Leaflet.LayerEvent) => void; + onbaselayerchange?(event: Leaflet.LayersControlEvent): void; + onoverlayadd?(event: Leaflet.LayersControlEvent): void; + onoverlayremove?(event: Leaflet.LayersControlEvent): void; + onlayeradd?(event: Leaflet.LayerEvent): void; + onlayerremove?(event: Leaflet.LayerEvent): void; } interface LeafletMapStateChangeEvents { - onzoomlevelschange?: (event: Leaflet.Event) => void; - onresize?: (event: Leaflet.ResizeEvent) => void; - onunload?: (event: Leaflet.Event) => void; - onviewreset?: (event: Leaflet.Event) => void; - onload?: (event: Leaflet.Event) => void; - onzoomstart?: (event: Leaflet.Event) => void; - onmovestart?: (event: Leaflet.Event) => void; - onzoom?: (event: Leaflet.Event) => void; - onmove?: (event: Leaflet.Event) => void; - onzoomend?: (event: Leaflet.Event) => void; - onmoveend?: (event: Leaflet.Event) => void; + onzoomlevelschange?(event: Leaflet.Event): void; + onresize?(event: Leaflet.ResizeEvent): void; + onunload?(event: Leaflet.Event): void; + onviewreset?(event: Leaflet.Event): void; + onload?(event: Leaflet.Event): void; + onzoomstart?(event: Leaflet.Event): void; + onmovestart?(event: Leaflet.Event): void; + onzoom?(event: Leaflet.Event): void; + onmove?(event: Leaflet.Event): void; + onzoomend?(event: Leaflet.Event): void; + onmoveend?(event: Leaflet.Event): void; } interface LeafletPopupEvents { - onpopupopen?: (event: Leaflet.PopupEvent) => void; - onpopupclose?: (event: Leaflet.PopupEvent) => void; - onautopanstart?: (event: Leaflet.Event) => void; + onpopupopen?(event: Leaflet.PopupEvent): void; + onpopupclose?(event: Leaflet.PopupEvent): void; + onautopanstart?(event: Leaflet.Event): void; } interface LeafletTooltipEvents { - ontooltipopen?: (event: Leaflet.TooltipEvent) => void; - ontooltipclose?: (event: Leaflet.TooltipEvent) => void; + ontooltipopen?(event: Leaflet.TooltipEvent): void; + ontooltipclose?(event: Leaflet.TooltipEvent): void; } interface LeafletLocationEvents { - onlocationerror?: (event: Leaflet.ErrorEvent) => void; - onlocationfound?: (event: Leaflet.LocationEvent) => void; + onlocationerror?(event: Leaflet.ErrorEvent): void; + onlocationfound?(event: Leaflet.LocationEvent): void; } interface LeafletInteractionEvents { - onclick?: (event: Leaflet.MouseEvent) => void; - ondblclick?: (event: Leaflet.MouseEvent) => void; - onmousedown?: (event: Leaflet.MouseEvent) => void; - onmouseup?: (event: Leaflet.MouseEvent) => void; - onmouseover?: (event: Leaflet.MouseEvent) => void; - onmouseout?: (event: Leaflet.MouseEvent) => void; - onmousemove?: (event: Leaflet.MouseEvent) => void; - oncontextmenu?: (event: Leaflet.MouseEvent) => void; - onkeypress?: (event: Leaflet.KeyboardEvent) => void; - onpreclick?: (event: Leaflet.MouseEvent) => void; + onclick?(event: Leaflet.MouseEvent): void; + ondblclick?(event: Leaflet.MouseEvent): void; + onmousedown?(event: Leaflet.MouseEvent): void; + onmouseup?(event: Leaflet.MouseEvent): void; + onmouseover?(event: Leaflet.MouseEvent): void; + onmouseout?(event: Leaflet.MouseEvent): void; + onmousemove?(event: Leaflet.MouseEvent): void; + oncontextmenu?(event: Leaflet.MouseEvent): void; + onkeypress?(event: Leaflet.KeyboardEvent): void; + onpreclick?(event: Leaflet.MouseEvent): void; } interface LeafletOtherEvents { - onzoomanim?: (event: Leaflet.ZoomAnimEvent) => void; + onzoomanim?(event: Leaflet.ZoomAnimEvent): void; } interface LeafletDraggingEvents { - ondragstart?: (event: Leaflet.Event) => void; - onmovestart?: (event: Leaflet.Event) => void; - ondrag?: (event: Leaflet.Event) => void; - ondragend?: (event: Leaflet.DragEndEvent) => void; - onmoveend?: (event: Leaflet.Event) => void; + ondragstart?(event: Leaflet.Event): void; + onmovestart?(event: Leaflet.Event): void; + ondrag?(event: Leaflet.Event): void; + ondragend?(event: Leaflet.DragEndEvent): void; + onmoveend?(event: Leaflet.Event): void; } interface MapProps extends React.HTMLProps, @@ -92,16 +92,16 @@ export const Pane: React.ComponentClass; // There is no Layer class, these are the base props for all layers on the map interface LayerProps extends LeafletInteractionEvents { - onadd?: (event: Leaflet.Event) => void; - onremove?: (event: Leaflet.Event) => void; + onadd?(event: Leaflet.Event): void; + onremove?(event: Leaflet.Event): void; // Popup events - onpopupopen?: (event: Leaflet.PopupEvent) => void; - onpopupclose?: (event: Leaflet.PopupEvent) => void; + onpopupopen?(event: Leaflet.PopupEvent): void; + onpopupclose?(event: Leaflet.PopupEvent): void; // Tooltip events - ontooltipopen?: (event: Leaflet.TooltipEvent) => void; - ontooltipclose?: (event: Leaflet.TooltipEvent) => void; + ontooltipopen?(event: Leaflet.TooltipEvent): void; + ontooltipclose?(event: Leaflet.TooltipEvent): void; } interface MarkerProps extends LayerProps, LeafletDraggingEvents { @@ -129,12 +129,12 @@ interface GridLayerProps extends LayerProps { opacity?: number; zIndex?: number; - onloading?: (event: Leaflet.Event) => void; - ontileunload?: (event: Leaflet.TileEvent) => void; - ontileloadstart?: (event: Leaflet.TileEvent) => void; - ontileerror?: (event: Leaflet.TileErrorEvent) => void; - ontileload?: (event: Leaflet.TileEvent) => void; - onload?: (event: Leaflet.Event) => void; + onloading?(event: Leaflet.Event): void; + ontileunload?(event: Leaflet.TileEvent): void; + ontileloadstart?(event: Leaflet.TileEvent): void; + ontileerror?(event: Leaflet.TileErrorEvent): void; + ontileload?(event: Leaflet.TileEvent): void; + onload?(event: Leaflet.Event): void; } export const GridLayer: React.ComponentClass; @@ -221,8 +221,8 @@ export namespace LayersControl { interface MapControlProps { position?: Leaflet.ControlPosition; } -declare class MapControl extends React.Component { - leafletElement?: L.Control +export class MapControl extends React.Component { + leafletElement?: L.Control; } interface ScaleControlProps { diff --git a/types/react-leaflet/react-leaflet-tests.tsx b/types/react-leaflet/react-leaflet-tests.tsx index 3c928dc322..7646109d69 100644 --- a/types/react-leaflet/react-leaflet-tests.tsx +++ b/types/react-leaflet/react-leaflet-tests.tsx @@ -603,8 +603,7 @@ const ZoomControlExample = () => ( ); - -//MapControl https://github.com/PaulLeCam/react-leaflet/issues/130 +// MapControl https://github.com/PaulLeCam/react-leaflet/issues/130 const mapControlCenter: [number, number] = [51.505, -0.09]; class CenterControl extends MapControl { // note we're extending MapControl from react-leaflet, not Component from react componentWillMount() { @@ -612,7 +611,7 @@ class CenterControl extends MapControl { // note we're extendi const jsx = ( // PUT YOUR JSX FOR THE COMPONENT HERE:
- // add your JSX + // add your JSX
); @@ -665,4 +664,4 @@ const LegendControlExample = () => ( -); \ No newline at end of file +); diff --git a/types/react-modal/index.d.ts b/types/react-modal/index.d.ts index d4a772366c..bb158bc6be 100644 --- a/types/react-modal/index.d.ts +++ b/types/react-modal/index.d.ts @@ -28,9 +28,9 @@ declare namespace ReactModal { /* Set this to properly hide your application from assistive screenreaders and other assistive technologies while the modal is open. */ appElement?: HTMLElement | {}; /* Function that will be run after the modal has opened. */ - onAfterOpen?: () => void; + onAfterOpen?(): void; /* Function that will be run when the modal is requested to be closed, prior to actually closing. */ - onRequestClose?: (event: (MouseEvent | KeyboardEvent)) => void; + onRequestClose?(event: (MouseEvent | KeyboardEvent)): void; /* Number indicating the milliseconds to wait before closing the modal. Defaults to zero (no timeout). */ closeTimeoutMS?: number; /* Boolean indicating if the appElement should be hidden. Defaults to true. */ @@ -48,7 +48,7 @@ declare namespace ReactModal { /* String indicating the role of the modal, allowing the 'dialog' role to be applied if desired. */ role?: string; /* Function that will be called to get the parent element that the modal will be attached to. */ - parentSelector?: () => HTMLElement; + parentSelector?(): HTMLElement; } } diff --git a/types/react-modal/react-modal-tests.tsx b/types/react-modal/react-modal-tests.tsx index d85796c065..51cdffba0a 100644 --- a/types/react-modal/react-modal-tests.tsx +++ b/types/react-modal/react-modal-tests.tsx @@ -42,4 +42,4 @@ class ExampleOfUsingReactModal extends React.Component<{}, {}> { ); } -}; +} diff --git a/types/react-onsenui/index.d.ts b/types/react-onsenui/index.d.ts index 3ce4a26686..5c25131be1 100644 --- a/types/react-onsenui/index.d.ts +++ b/types/react-onsenui/index.d.ts @@ -5,32 +5,32 @@ // TypeScript Version: 2.1 import { Component } from 'react'; -declare interface Modifiers_string { - default?: string, - material?: string +export interface Modifiers_string { + default?: string; + material?: string; } -declare interface Modifiers_number { - default?: number, - material?: number +export interface Modifiers_number { + default?: number; + material?: number; } -declare interface AnimationOptions { - duration?: number, - delay?: number, - timing?: string +export interface AnimationOptions { + duration?: number; + delay?: number; + timing?: string; } /*** splitter ***/ -declare class SplitterSide extends Component<{ +export class SplitterSide extends Component<{ side?: "left" | "right", collapse?: "portrait" | "landscape" | boolean, isOpen?: boolean, - onOpen?: (e?: Event) => void, - onPreOpen?: (e?: Event) => void, - onPreClose?: (e?: Event) => void, - onModeChange?: (e?: Event) => void, - onClose?: (e?: Event) => void, + onOpen?(e?: Event): void, + onPreOpen?(e?: Event): void, + onPreClose?(e?: Event): void, + onModeChange?(e?: Event): void, + onClose?(e?: Event): void, isSwipeable?: boolean, swipeTargetWidth?: number, width?: number, @@ -38,80 +38,77 @@ declare class SplitterSide extends Component<{ animationOptions?: AnimationOptions, openThreshold?: number, mode?: "collapse" | "split" -}, any>{ } +}, any> { } +export class SplitterContent extends Component<{}, any> { } -declare class SplitterContent extends Component<{}, any> { } - -declare class Splitter extends Component<{}, any> { } +export class Splitter extends Component<{}, any> { } /*** toolbar ***/ -declare class Toolbar extends Component<{}, any>{} +export class Toolbar extends Component<{}, any> {} - -declare class BottomToolbar extends Component<{ +export class BottomToolbar extends Component<{ modifier?: string -}, any>{} +}, any> {} - -declare class ToolbarButton extends Component<{ +export class ToolbarButton extends Component<{ modifier?: string, disabled?: boolean, - onClick?: (e?: Event) => void -}, any>{} + onClick?(e?: Event): void +}, any> {} /*** icon ***/ -declare class Icon extends Component<{ +export class Icon extends Component<{ modifier?: string, icon?: string | Modifiers_string, size?: number | Modifiers_number, rotate?: 90 | 180 | 270, fixedWidth?: boolean, spin?: boolean -}, any>{} +}, any> {} /*** page ***/ -declare class Page extends Component<{ +export class Page extends Component<{ contentStyle?: any, modifier?: string, - renderModal?: () => void, - renderToolbar?: () => void, - renderBottomToolbar?: () => void, - renderFixed?: () => void, - onInit?: () => void, - onShow?: () => void, - onHide?: () => void -}, any>{} + renderModal?(): void, + renderToolbar?(): void, + renderBottomToolbar?(): void, + renderFixed?(): void, + onInit?(): void, + onShow?(): void, + onHide?(): void +}, any> {} /*** Grid ***/ -declare class Col extends Component<{ +export class Col extends Component<{ verticalAlign?: "top" | "bottom" | "center", width?: string -}, any>{} +}, any> {} -declare class Row extends Component<{ +export class Row extends Component<{ verticalAlign?: "top" | "bottom" | "center", -}, any>{} +}, any> {} /*** Navigation ***/ -declare class BackButton extends Component<{ +export class BackButton extends Component<{ modifier?: string, - onClick?: (navigator: Navigator) => void -}, any>{} + onClick?(navigator: Navigator): void +}, any> {} -declare class Navigator extends Component<{ - renderPage: () => any, +export class Navigator extends Component<{ + renderPage(): any, initialRouteStack?: string[], initialRoute?: any, - onPrePush?: () => void, - onPostPush?: () => void, - onPrePop?: () => void, - onPostPop?: () => void, + onPrePush?(): void, + onPostPush?(): void, + onPrePop?(): void, + onPostPop?(): void, animation?: "slide" | "lift" | "fade" | "none" | string, animationOptions?: AnimationOptions -}, any>{ +}, any> { resetPage(route: any, options: any): void; resetPageStack(route: any, options: any): void; pushPage(route: any, options: any): void; @@ -119,7 +116,7 @@ declare class Navigator extends Component<{ } /*** Carousel ***/ -declare class Carousel extends Component<{ +export class Carousel extends Component<{ direction?: "horizontal" | "vertical", fullscreen?: boolean, overscrollable?: boolean, @@ -132,19 +129,19 @@ declare class Carousel extends Component<{ disabled?: boolean, index?: number, autoRefresh?: boolean, - onPostChange?: () => void, - onRefresh?: () => void, - onOverscroll?: () => void + onPostChange?(): void, + onRefresh?(): void, + onOverscroll?(): void animationOptions?: AnimationOptions -}, any>{} +}, any> {} -declare class CarouselItem extends Component<{ +export class CarouselItem extends Component<{ modifier: string -}, any>{} +}, any> {} /*** AlertDialog ***/ -declare class AlertDialog extends Component<{ - onCancel?: () => void, +export class AlertDialog extends Component<{ + onCancel?(): void, isOpen?: boolean, isCancelable?: boolean, isDisabled?: boolean, @@ -152,14 +149,14 @@ declare class AlertDialog extends Component<{ modifier?: string, maskColor?: string, animationOptions?: AnimationOptions, - onPreShow?: () => void, - onPostShow?: () => void, - onPreHide?: () => void, - onPostHide?: () => void, -}, any>{} + onPreShow?(): void, + onPostShow?(): void, + onPreHide?(): void, + onPostHide?(): void, +}, any> {} -declare class Dialog extends Component<{ - onCancel?: () => void, +export class Dialog extends Component<{ + onCancel?(): void, isOpen?: boolean, isCancelable?: boolean, isDisabled?: boolean, @@ -167,23 +164,23 @@ declare class Dialog extends Component<{ modifier?: string, maskColor?: string, animationOptions?: AnimationOptions, - onPreShow?: () => void, - onPostShow?: () => void, - onPreHide?: () => void, - onPostHide?: () => void, -}, any>{} + onPreShow?(): void, + onPostShow?(): void, + onPreHide?(): void, + onPostHide?(): void, +}, any> {} -declare class Modal extends Component<{ +export class Modal extends Component<{ animation?: "fade" | "none", animationOptions?: AnimationOptions - onShow?: () => void, - onHide?: () => void, + onShow?(): void, + onHide?(): void, isOpen?: boolean -}, any>{} +}, any> {} -declare class Popover extends Component<{ - getTarget?: () => Component | HTMLElement, - onCancel?: () => void, +export class Popover extends Component<{ + getTarget?(): Component | HTMLElement, + onCancel?(): void, isOpen?: boolean, isCancelable?: boolean, isDisabled?: boolean, @@ -191,52 +188,52 @@ declare class Popover extends Component<{ modifier?: string, maskColor?: string, animationOptions?: AnimationOptions, - onPreShow?: () => void, - onPostShow?: () => void, - onPreHide?: () => void, - onPostHide?: () => void, -}, any>{} + onPreShow?(): void, + onPostShow?(): void, + onPreHide?(): void, + onPostHide?(): void, +}, any> {} -declare class ProgressBar extends Component<{ +export class ProgressBar extends Component<{ modifier?: string, value?: number, secondaryValue?: boolean, intermediate?: boolean, }, any> {} -declare class ProgressCircular extends Component<{ +export class ProgressCircular extends Component<{ modifier?: string, value?: number, secondaryValue?: boolean, intermediate?: boolean, -}, any>{} +}, any> {} -declare class Ripple extends Component<{ +export class Ripple extends Component<{ color?: string, background?: string, disabled?: boolean, -}, any>{} +}, any> {} /*** Forms ***/ -declare class Fab extends Component<{ +export class Fab extends Component<{ modifier?: string, ripple?: boolean, position?: string, disabled?: boolean, - onClick?: () => void, -}, any>{} + onClick?(): void, +}, any> {} -declare class Button extends Component<{ +export class Button extends Component<{ modifier?: string, disabled?: boolean, ripple?: boolean, - onClick?: (e?: Event) => void -}, any>{} + onClick?(e?: Event): void +}, any> {} -declare class Input extends Component<{ +export class Input extends Component<{ modifier?: string, disabled?: boolean, - onChange?: (e: Event) => void, + onChange?(e: Event): void, value?: string, checked?: boolean, placeholder?: string, @@ -245,70 +242,67 @@ declare class Input extends Component<{ float?: boolean, }, any> {} -declare class Range extends Component<{ +export class Range extends Component<{ modifier?: string, - onChange?: (e: Event) => void, + onChange?(e: Event): void, value?: number, disabled?: boolean, -}, any>{} +}, any> {} -declare class Switch extends Component<{ - onChange?: (e: Event) => void, +export class Switch extends Component<{ + onChange?(e: Event): void, checked?: boolean, disabled?: boolean, inputId?: string -}, any>{} +}, any> {} /** -* Tabs -*/ + * Tabs + */ -declare class Tab extends Component<{}, any>{ } +export class Tab extends Component<{}, any> { } -declare class TabActive extends Component<{}, any>{ } +export class TabActive extends Component<{}, any> { } -declare class TabInactive extends Component<{}, any>{ } +export class TabInactive extends Component<{}, any> { } -declare class Tabbar extends Component<{ +export class Tabbar extends Component<{ index?: number, - renderTabs?: () => any, + renderTabs?(): any, position?: "bottom" | "top" | "auto", animation: "none" | "slide" | "fade", animationOptions?: AnimationOptions, - onPreChange?: () => void, - onPostChange?: () => void, - onReactive?: () => void, + onPreChange?(): void, + onPostChange?(): void, + onReactive?(): void, }, any> { } - /** -* Lists -*/ + * Lists + */ -declare class LazyList extends Component<{ +export class LazyList extends Component<{ modifier?: string, length?: number, - renderRow: (rowIndex: number) => any, - calculateItemHeight: (rowIndex: number) => any, -}, any>{ } + renderRow(rowIndex: number): any, + calculateItemHeight(rowIndex: number): any, +}, any> { } -declare class List extends Component<{ +export class List extends Component<{ modifier?: string, dataSource?: string[], - renderRow?: () => void, - renderHeader?: () => void, - renderFooter?: () => void, -}, any>{} + renderRow?(): void, + renderHeader?(): void, + renderFooter?(): void, +}, any> {} -declare class ListHeader extends Component<{ +export class ListHeader extends Component<{ modifier?: string, -}, any>{} +}, any> {} -declare class ListItem extends Component<{ +export class ListItem extends Component<{ modifier?: string, tappable?: boolean, tapBackgroundColor?: string, lockOnDrag?: boolean, -}, any>{} - - +}, any> {} diff --git a/types/react-onsenui/react-onsenui-tests.tsx b/types/react-onsenui/react-onsenui-tests.tsx index b72e8c3a37..fdc498fa17 100644 --- a/types/react-onsenui/react-onsenui-tests.tsx +++ b/types/react-onsenui/react-onsenui-tests.tsx @@ -6,11 +6,9 @@ class AppState { isOpen: boolean = false; } -interface AppProps { -} - -export class App extends React.Component{ +interface AppProps {} // tslint:disable-line no-empty-interface +export class App extends React.Component { constructor(props?: AppProps) { super(props); this.state = new AppState(); @@ -21,7 +19,6 @@ export class App extends React.Component{ } render() { - return ( { ); } - } - -ReactDOM.render(, document.getElementById('react-body')); \ No newline at end of file +ReactDOM.render(, document.getElementById('react-body')); diff --git a/types/react-overlays/index.d.ts b/types/react-overlays/index.d.ts index 10b67d9d51..db292d7f52 100644 --- a/types/react-overlays/index.d.ts +++ b/types/react-overlays/index.d.ts @@ -58,37 +58,36 @@ interface AffixProps { /** * Callback fired when the right before the `affixStyle` and `affixStyle` props are rendered */ - onAffix?: () => void; + onAffix?(): void; /** * Callback fired after the component `affixStyle` and `affixClassName` props have been rendered. */ - onAffixed?: () => void; + onAffixed?(): void; /** * Callback fired when the right before the `topStyle` and `topClassName` props are rendered */ - onAffixTop?: () => void; + onAffixTop?(): void; /** * Callback fired after the component `topStyle` and `topClassName` props have been rendered. */ - onAffixedTop?: () => void; + onAffixedTop?(): void; /** * Callback fired when the right before the `bottomStyle` and `bottomClassName` props are rendered */ - onAffixBottom?: () => void; + onAffixBottom?(): void; /** * Callback fired after the component `bottomStyle` and `bottomClassName` props have been rendered. */ - onAffixedBottom?: () => void; + onAffixedBottom?(): void; } export class Affix extends React.Component { } // interface AutoAffixProps extends AffixProps { - /** * The logical container node or component for determining offset from bottom * of viewport, or a function that returns it @@ -155,32 +154,31 @@ interface TransitionProps { /** * Callback fired before the "entering" classes are applied */ - onEnter?: (element: Element) => void; + onEnter?(element: Element): void; /** * Callback fired after the "entering" classes are applied */ - onEntering?: (element: Element) => void; + onEntering?(element: Element): void; /** * Callback fired after the "enter" classes are applied */ - onEntered?: (element: Element) => void; + onEntered?(element: Element): void; /** * Callback fired before the "exiting" classes are applied */ - onExit?: (element: Element) => void; + onExit?(element: Element): void; /** * Callback fired after the "exiting" classes are applied */ - onExiting?: (element: Element) => void; + onExiting?(element: Element): void; /** * Callback fired after the "exited" classes are applied */ - onExited?: (element: Element) => void; + onExited?(element: Element): void; } export class Transition extends React.Component { } - diff --git a/types/react-overlays/lib/RootCloseWrapper.d.ts b/types/react-overlays/lib/RootCloseWrapper.d.ts index 0642bdcc52..384df80f4a 100644 --- a/types/react-overlays/lib/RootCloseWrapper.d.ts +++ b/types/react-overlays/lib/RootCloseWrapper.d.ts @@ -2,7 +2,7 @@ import * as React from "react"; // interface RootCloseWrapperProps { - onRootClose?: () => void; + onRootClose?(): void; children?: React.ReactNode; /** diff --git a/types/react-overlays/react-overlays-tests.tsx b/types/react-overlays/react-overlays-tests.tsx index dd151e10e9..bbe526853f 100644 --- a/types/react-overlays/react-overlays-tests.tsx +++ b/types/react-overlays/react-overlays-tests.tsx @@ -17,7 +17,6 @@ function testTransition() { ); } - class TestAffix extends React.Component<{}, {}> { render(): JSX.Element { return ( diff --git a/types/react-paginate/index.d.ts b/types/react-paginate/index.d.ts index 18636a8f6f..b6b50170c2 100644 --- a/types/react-paginate/index.d.ts +++ b/types/react-paginate/index.d.ts @@ -45,7 +45,7 @@ interface ReactPaginateProps { /** * The method to call when a page is clicked. Exposes the current page object as an argument. */ - onPageChange?: (selectedItem: {selected: number}) => void; + onPageChange?(selectedItem: {selected: number}): void; /** * The initial page selected. @@ -110,7 +110,7 @@ interface ReactPaginateProps { /** * The method is called to generate the href attribute value on tag a of each page element. */ - hrefBuilder?: (pageIndex: number) => void; + hrefBuilder?(pageIndex: number): void; } declare const ReactPaginate: React.ComponentClass; diff --git a/types/react-paginate/react-paginate-tests.tsx b/types/react-paginate/react-paginate-tests.tsx index 5f8f8f1994..31efb805ce 100644 --- a/types/react-paginate/react-paginate-tests.tsx +++ b/types/react-paginate/react-paginate-tests.tsx @@ -2,7 +2,6 @@ import * as React from "react"; import ReactPaginate = require("react-paginate"); class Test extends React.Component<{}, {}> { - render() { return ( { - closePortal: () => {}; + closePortal(): {}; } interface ReactPortalProps { @@ -15,10 +15,10 @@ interface ReactPortalProps { openByClickOn?: React.ReactElement; closeOnEsc?: boolean; closeOnOutsideClick?: boolean; - onOpen?: (node: HTMLDivElement) => {}; - beforeClose?: (node: HTMLDivElement, resetPortalState: () => void) => {}; - onClose?: () => {}; - onUpdate?: () => {}; + onOpen?(node: HTMLDivElement): {}; + beforeClose?(node: HTMLDivElement, resetPortalState: () => void): {}; + onClose?(): {}; + onUpdate?(): {}; } declare const ReactPortal: React.ComponentClass; diff --git a/types/react-portal/react-portal-tests.tsx b/types/react-portal/react-portal-tests.tsx index b192e297c7..f3bd6d4b83 100644 --- a/types/react-portal/react-portal-tests.tsx +++ b/types/react-portal/react-portal-tests.tsx @@ -4,7 +4,6 @@ import * as ReactDOM from "react-dom"; import * as Portal from "react-portal"; export default class App extends React.Component<{}, {}> { - render() { const button1 = ; @@ -17,10 +16,9 @@ export default class App extends React.Component<{}, {}> { ); } - } -export class PseudoModal extends React.Component<{ closePortal?: () => {} }, {}> { +export class PseudoModal extends React.Component<{ closePortal?(): {} }, {}> { render() { return (
@@ -31,4 +29,4 @@ export class PseudoModal extends React.Component<{ closePortal?: () => {} }, {}> } } -ReactDOM.render(, document.getElementById('react-body')); \ No newline at end of file +ReactDOM.render(, document.getElementById('react-body')); diff --git a/types/react-recaptcha/index.d.ts b/types/react-recaptcha/index.d.ts index 39cca4037c..af6853efb3 100644 --- a/types/react-recaptcha/index.d.ts +++ b/types/react-recaptcha/index.d.ts @@ -10,16 +10,16 @@ export = Recaptcha; interface RecaptchaProps { className?: string; elementID?: string; - expiredCallback?: () => any; + expiredCallback?(): any; expiredCallbackName?: string; - onloadCallback?: () => any; + onloadCallback?(): any; onloadCallbackName?: string; render?: string; size?: string; tabindex?: string; theme?: "dark" | "light"; type?: string; - verifyCallback?: () => any; + verifyCallback?(): any; verifyCallbackName?: string; sitekey?: string; } diff --git a/types/react-recaptcha/react-recaptcha-tests.tsx b/types/react-recaptcha/react-recaptcha-tests.tsx index 624020cc62..d931e45ae3 100644 --- a/types/react-recaptcha/react-recaptcha-tests.tsx +++ b/types/react-recaptcha/react-recaptcha-tests.tsx @@ -7,4 +7,4 @@ ReactDOM.render( sitekey="xxxxxxxxxxxxxxxxxxxx" />, document.getElementById('example') -); \ No newline at end of file +); diff --git a/types/react-sidebar/index.d.ts b/types/react-sidebar/index.d.ts index a68749488c..1f3484762a 100644 --- a/types/react-sidebar/index.d.ts +++ b/types/react-sidebar/index.d.ts @@ -9,7 +9,7 @@ export interface SidebarProps { contentClassName?: string; docked?: boolean; dragToggleDistance?: number; - onSetOpen?: () => {}; + onSetOpen?(): {}; open?: boolean; overlayClassName?: string; pullRight?: boolean; diff --git a/types/react-smooth-scrollbar/index.d.ts b/types/react-smooth-scrollbar/index.d.ts index 6aea289136..54cc7d91b5 100644 --- a/types/react-smooth-scrollbar/index.d.ts +++ b/types/react-smooth-scrollbar/index.d.ts @@ -12,7 +12,7 @@ declare namespace Scrollbar { /** * Pipe to scrollbar.addListener() */ - onScroll?: (status: ScrollStatusObject, scrollbarInstance: SmoothScrollbar) => void; + onScroll?(status: ScrollStatusObject, scrollbarInstance: SmoothScrollbar): void; /** * Keep scrollbar tracks visible whether it's scrolling or not * @default false @@ -34,7 +34,6 @@ declare class Scrollbar extends React.Component { * Scrollbar instance */ readonly scrollbar: SmoothScrollbar; - } export as namespace Scrollbar; diff --git a/types/react-sticky/index.d.ts b/types/react-sticky/index.d.ts index 8c965da4ab..b83fa37ac4 100644 --- a/types/react-sticky/index.d.ts +++ b/types/react-sticky/index.d.ts @@ -16,7 +16,7 @@ export interface StickyProps { stickyStyle?: any; topOffset?: number; bottomOffset?: number; - onStickyStateChange?: (isSticky: boolean) => void; + onStickyStateChange?(isSticky: boolean): void; } export const Sticky: React.ComponentClass; diff --git a/types/react-test-renderer/index.d.ts b/types/react-test-renderer/index.d.ts index 9908394888..927e041378 100644 --- a/types/react-test-renderer/index.d.ts +++ b/types/react-test-renderer/index.d.ts @@ -16,7 +16,7 @@ interface ReactTestRendererJSON { $$typeof?: any; } interface TestRendererOptions { - createNodeMock: (element: ReactElement) => any; + createNodeMock(element: ReactElement): any; } // https://github.com/facebook/react/blob/master/src/renderers/testing/ReactTestMount.js#L155 export function create(nextElement: ReactElement, options?: TestRendererOptions): Renderer; diff --git a/types/reactstrap/index.d.ts b/types/reactstrap/index.d.ts index 198b410ed4..6dadd6d284 100644 --- a/types/reactstrap/index.d.ts +++ b/types/reactstrap/index.d.ts @@ -4,79 +4,79 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 -export { default as Alert } from './lib/Alert' -export { default as Badge } from './lib/Badge' -export { default as Breadcrumb } from './lib/Breadcrumb' -export { default as BreadcrumbItem } from './lib/BreadcrumbItem' -export { default as Button } from './lib/Button' -export { default as ButtonDropdown } from './lib/ButtonDropdown' -export { default as ButtonGroup } from './lib/ButtonGroup' -export { default as ButtonToolbar } from './lib/ButtonToolbar' -export { default as Card } from './lib/Card' -export { default as CardBlock } from './lib/CardBlock' -export { default as CardColumns } from './lib/CardColumns' -export { default as CardDeck } from './lib/CardDeck' -export { default as CardFooter } from './lib/CardFooter' -export { default as CardGroup } from './lib/CardGroup' -export { default as CardHeader } from './lib/CardHeader' -export { default as CardImg } from './lib/CardImg' -export { default as CardImgOverlay } from './lib/CardImgOverlay' -export { default as CardLink } from './lib/CardLink' -export { default as CardSubtitle } from './lib/CardSubtitle' -export { default as CardText } from './lib/CardText' -export { default as CardTitle } from './lib/CardTitle' -export { default as Col } from './lib/Col' -export { default as Collapse } from './lib/Collapse' -export { default as Container } from './lib/Container' -export { default as Dropdown } from './lib/Dropdown' -export { default as DropdownItem } from './lib/DropdownItem' -export { default as DropdownMenu } from './lib/DropdownMenu' -export { default as DropdownToggle } from './lib/DropdownToggle' -export { default as Fade } from './lib/Fade' -export { default as Form } from './lib/Form' -export { default as FormFeedback } from './lib/FormFeedback' -export { default as FormGroup } from './lib/FormGroup' -export { default as FormText } from './lib/FormText' -export { default as Input } from './lib/Input' -export { default as InputGroup } from './lib/InputGroup' -export { default as InputGroupAddon } from './lib/InputGroupAddon' -export { default as InputGroupButton } from './lib/InputGroupButton' -export { default as Jumbotron } from './lib/Jumbotron' -export { default as Label } from './lib/Label' -export { default as ListGroup } from './lib/ListGroup' -export { default as ListGroupItem } from './lib/ListGroupItem' -export { default as ListGroupItemHeading } from './lib/ListGroupItemHeading' -export { default as ListGroupItemText } from './lib/ListGroupItemText' -export { default as Media } from './lib/Media' -export { default as Modal } from './lib/Modal' -export { default as ModalBody } from './lib/ModalBody' -export { default as ModalFooter } from './lib/ModalFooter' -export { default as ModalHeader } from './lib/ModalHeader' -export { default as Nav } from './lib/Nav' -export { default as Navbar } from './lib/Navbar' -export { default as NavbarBrand } from './lib/NavbarBrand' -export { default as NavbarToggler } from './lib/NavbarToggler' -export { default as NavDropdown } from './lib/NavDropdown' -export { default as NavItem } from './lib/NavItem' -export { default as NavLink } from './lib/NavLink' -export { default as Pagination } from './lib/Pagination' -export { default as PaginationItem } from './lib/PaginationItem' -export { default as PaginationLink } from './lib/PaginationLink' -export { default as Popover } from './lib/Popover' -export { default as PopoverContent } from './lib/PopoverContent' -export { default as PopoverTitle } from './lib/PopoverTitle' -export { default as Progress } from './lib/Progress' -export { default as Row } from './lib/Row' -export { default as TabContent } from './lib/TabContent' -export { default as Table } from './lib/Table' -export { default as TabPane } from './lib/TabPane' -export { default as Tag } from './lib/Tag' -export { default as TetherContent } from './lib/TetherContent' -export { default as Tooltip } from './lib/Tooltip' +export { default as Alert } from './lib/Alert'; +export { default as Badge } from './lib/Badge'; +export { default as Breadcrumb } from './lib/Breadcrumb'; +export { default as BreadcrumbItem } from './lib/BreadcrumbItem'; +export { default as Button } from './lib/Button'; +export { default as ButtonDropdown } from './lib/ButtonDropdown'; +export { default as ButtonGroup } from './lib/ButtonGroup'; +export { default as ButtonToolbar } from './lib/ButtonToolbar'; +export { default as Card } from './lib/Card'; +export { default as CardBlock } from './lib/CardBlock'; +export { default as CardColumns } from './lib/CardColumns'; +export { default as CardDeck } from './lib/CardDeck'; +export { default as CardFooter } from './lib/CardFooter'; +export { default as CardGroup } from './lib/CardGroup'; +export { default as CardHeader } from './lib/CardHeader'; +export { default as CardImg } from './lib/CardImg'; +export { default as CardImgOverlay } from './lib/CardImgOverlay'; +export { default as CardLink } from './lib/CardLink'; +export { default as CardSubtitle } from './lib/CardSubtitle'; +export { default as CardText } from './lib/CardText'; +export { default as CardTitle } from './lib/CardTitle'; +export { default as Col } from './lib/Col'; +export { default as Collapse } from './lib/Collapse'; +export { default as Container } from './lib/Container'; +export { default as Dropdown } from './lib/Dropdown'; +export { default as DropdownItem } from './lib/DropdownItem'; +export { default as DropdownMenu } from './lib/DropdownMenu'; +export { default as DropdownToggle } from './lib/DropdownToggle'; +export { default as Fade } from './lib/Fade'; +export { default as Form } from './lib/Form'; +export { default as FormFeedback } from './lib/FormFeedback'; +export { default as FormGroup } from './lib/FormGroup'; +export { default as FormText } from './lib/FormText'; +export { default as Input } from './lib/Input'; +export { default as InputGroup } from './lib/InputGroup'; +export { default as InputGroupAddon } from './lib/InputGroupAddon'; +export { default as InputGroupButton } from './lib/InputGroupButton'; +export { default as Jumbotron } from './lib/Jumbotron'; +export { default as Label } from './lib/Label'; +export { default as ListGroup } from './lib/ListGroup'; +export { default as ListGroupItem } from './lib/ListGroupItem'; +export { default as ListGroupItemHeading } from './lib/ListGroupItemHeading'; +export { default as ListGroupItemText } from './lib/ListGroupItemText'; +export { default as Media } from './lib/Media'; +export { default as Modal } from './lib/Modal'; +export { default as ModalBody } from './lib/ModalBody'; +export { default as ModalFooter } from './lib/ModalFooter'; +export { default as ModalHeader } from './lib/ModalHeader'; +export { default as Nav } from './lib/Nav'; +export { default as Navbar } from './lib/Navbar'; +export { default as NavbarBrand } from './lib/NavbarBrand'; +export { default as NavbarToggler } from './lib/NavbarToggler'; +export { default as NavDropdown } from './lib/NavDropdown'; +export { default as NavItem } from './lib/NavItem'; +export { default as NavLink } from './lib/NavLink'; +export { default as Pagination } from './lib/Pagination'; +export { default as PaginationItem } from './lib/PaginationItem'; +export { default as PaginationLink } from './lib/PaginationLink'; +export { default as Popover } from './lib/Popover'; +export { default as PopoverContent } from './lib/PopoverContent'; +export { default as PopoverTitle } from './lib/PopoverTitle'; +export { default as Progress } from './lib/Progress'; +export { default as Row } from './lib/Row'; +export { default as TabContent } from './lib/TabContent'; +export { default as Table } from './lib/Table'; +export { default as TabPane } from './lib/TabPane'; +export { default as Tag } from './lib/Tag'; +export { default as TetherContent } from './lib/TetherContent'; +export { default as Tooltip } from './lib/Tooltip'; export { UncontrolledAlert, UncontrolledButtonDropdown, UncontrolledDropdown, UncontrolledNavDropdown, UncontrolledTooltip -} from './lib/Uncontrolled' \ No newline at end of file +} from './lib/Uncontrolled'; diff --git a/types/reactstrap/reactstrap-tests.tsx b/types/reactstrap/reactstrap-tests.tsx index 71ab35ff9b..d4320246b7 100644 --- a/types/reactstrap/reactstrap-tests.tsx +++ b/types/reactstrap/reactstrap-tests.tsx @@ -76,8 +76,7 @@ import { Tooltip } from 'reactstrap'; - -//--------------- Alert +// --------------- Alert const Examplea = (props: any) => { return (
@@ -103,7 +102,7 @@ class AlertExample extends React.Component { this.state = { visible: true - } + }; } onDismiss = () => { @@ -127,7 +126,7 @@ function AlertExample1() { ); } -//--------------- Badge +// --------------- Badge class Example2 extends React.Component { render() { return ( @@ -173,7 +172,7 @@ class Example4 extends React.Component { } } -//------------- Breadcrumbs +// ------------- Breadcrumbs const Example5 = (props: any) => { return (
@@ -206,7 +205,7 @@ const Example6 = (props: any) => { ); }; -//------------- Buttons +// ------------- Buttons class Example7 extends React.Component { render() { return ( @@ -243,35 +242,35 @@ const Example9 = ( {' '}
-) +); const Example10 = (
{' '}
-) +); const Example11 = (
-) +); const Example12 = (
{' '}
-) +); const Example13 = (
{' '}
-) +); class Example14 extends React.Component { constructor(props: any) { @@ -320,7 +319,7 @@ class Example14 extends React.Component { } } -//------------- Button Dropdown +// ------------- Button Dropdown class Example15 extends React.Component { constructor(props: any) { super(props); @@ -368,7 +367,7 @@ const Example16 = ( Another Action -) +); const Example17 = (props: any) => ( true}> @@ -382,7 +381,7 @@ const Example17 = (props: any) => ( Another Action -) +); const Example18 = (
@@ -406,7 +405,7 @@ const Example18 = (
-) +); const Example19 = ( true} dropup> @@ -418,11 +417,9 @@ const Example19 = ( Another Action -) +); - - -//--------------- ButtonGroup +// --------------- ButtonGroup class Example20 extends React.Component { render() { return ( @@ -478,7 +475,7 @@ const Example22 = (props: any) => (
-) +); const Example23 = (props: any) => ( @@ -494,8 +491,7 @@ const Example23 = (props: any) => ( - -) +); const Example24 = (props: any) => ( @@ -511,10 +507,9 @@ const Example24 = (props: any) => ( -) +); - -//------------------ Cards +// ------------------ Cards const Example25 = (props: any) => { return (
@@ -862,8 +857,7 @@ const Example36 = (props: any) => { ); }; - -//------------------ Collapse +// ------------------ Collapse class Example37 extends React.Component { constructor(props: any) { @@ -937,8 +931,7 @@ class Example38 extends React.Component { } } - -//------- Dropdown +// ------- Dropdown class Example39 extends React.Component { constructor(props: any) { @@ -987,11 +980,11 @@ const Example40 = (props: any) => ( Another Action -) +); const Example41 = (props: any) => ( Header -) +); const Example42 = (props: any) => (
@@ -1014,7 +1007,7 @@ const Example42 = (props: any) => (
-) +); class Example43 extends React.Component { constructor(props: any) { @@ -1071,8 +1064,7 @@ function Example44() { ); } - -//------------------ Form +// ------------------ Form class Example45 extends React.Component { render() { return ( @@ -1476,7 +1468,7 @@ const Example53 = (props: any) => {
); -} +}; const Example54 = (props: any) => { return ( @@ -1602,7 +1594,6 @@ const Example59 = (props: any) => { ); }; - const Example60 = (props: any) => { return (
@@ -1933,8 +1924,7 @@ const Example71 = () => { ); }; - -//--------------- Modal +// --------------- Modal class ModalExample72 extends React.Component { constructor(props: any) { super(props); @@ -2322,7 +2312,7 @@ class Example80 extends React.Component { } } -//----------- Pagination +// ----------- Pagination class Example81 extends React.Component { render() { return ( @@ -2363,7 +2353,6 @@ class Example81 extends React.Component { } } - class Example82 extends React.Component { render() { return ( @@ -2404,7 +2393,6 @@ class Example82 extends React.Component { } } - class Example83 extends React.Component { render() { return ( @@ -2465,8 +2453,7 @@ class Example84 extends React.Component { } } - -//------------------------- Popover +// ------------------------- Popover class Example85 extends React.Component { constructor(props: any) { super(props); @@ -2529,7 +2516,7 @@ class PopoverItem extends React.Component { } } -class PopoverExampleMulti extends React.Component { +class PopoverExampleMulti extends React.Component}> { constructor(props: any) { super(props); @@ -2566,8 +2553,7 @@ class PopoverExampleMulti extends React.Component { return ( @@ -2711,8 +2697,7 @@ const Example92 = (props: any) => { ); }; - -//--------------- Table +// --------------- Table class Example93 extends React.Component { render() { return ( @@ -3103,7 +3088,6 @@ class Example101 extends React.Component { } } - class Example102 extends React.Component { constructor(props: any) { super(props); @@ -3132,7 +3116,6 @@ class Example102 extends React.Component { } } - class Example103 extends React.Component { constructor(props: any) { super(props);