mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* base-64 typings
* formatting and indenting
* feat: add typings for watchpack
* fix: improve missing typings
* Port from https://github.com/agileek/typings-vis/blob/master/vs.d.ts
* Fix travis build failures
* Port PR https://github.com/agileek/typings-vis/pull/12
* Fix travis build failures
* added tsconfig and tslint
* removed patch number
* added tests
* made it export like base64-js
* removed old code
* formatted code
* fix: add files field in tsconfig.json for expected publishment
* fix: improve most missing typings
* feat: upgrade to v3.0.0
* feat: upgrade to tapbale v0.2.5
* Types 2.0 (#13261)
* updating typing of the latest 7.0 react-autosuggest
* updating typing of react-autosuggest 7.0
* update typings for react-autosuggest 7.0
* Remove '+' from header versions, so they can be parsed (#13239)
* Updated masonry-layout to fix linting errors (#13272)
* Updated masonry-layout to fix linting errors
* Fixed the tests I could fix.
* Removed patch version
* Add redux-persist and basic transformers (#13389)
* Add definitions for redux-persist
* Add missin generic types
* Add definitions for filter transformer
* Add definitions for encrypt transformer
* Fix header
* Add definitions for compress transformer
* Delete unnecessary linter configs
* Change way of importing, fix tests
* fix: angulartics type definition for ES6 import
* fix: lint error
* fix scalar type config (#13398)
The `GraphQLScalarTypeConfig` interface had incorrect types. Correct types may be seen here: 379a308439/src/type/definition.js (L348-L350)
* [interact.js] Update module names (#13316)
Update CommonJS module name as it was changed in version 1.2.7.
AMD module name is also different from both new and old CommonJS module names, so a separate declaration was created for that as well.
* Add definitions for redux-recycle (#13424)
* Add definitions for redux-recycle
* Fix linter errors
* [jest] add type definition for toHaveBeenLastCalledWith (#13038)
* remove ajv because the package bundles its own types (#13028)
* Updated type definitions to yfiles for HTML 2.0. (#13332)
* Updated type definitions to yFiles for HTML 2.0.
* Updated type definitions to yfiles for HTML 2.0.
* Added contact in yfiles .d.ts header.
* Add redux-batched-actions typings. (#13054)
* Add types for mailgen (#13080)
* Typings for cordova-sqlite-storage (#13081)
* Add flatpickr definitions (#13083)
* Add pouch-redux-middleware typing (#13071)
* Add pouch-redux-middleware typing
* Fix <> in comment
* Add declaration for crc (#13068)
* Updated jquery.dataTables for 1.10.9 (#13099)
Release Notes: https://cdn.datatables.net/1.10.9/
* Moved legacy browser settings to its own data type.
* Added 'aIds' property on legacy settings object for mapping row ids to data indexes.
* Added 'rowIdFn' function to legacy settings object to get a row's id from the row's data.
* chore(lint): change vis typing to external module (#13399)
* Fix cordova-sqlite-storage lint
* Lint `vis`: Remove "I" prefix for namespaces
* Change cordova-sqlite-storage back. Linter was wrong.
260 lines
8.2 KiB
TypeScript
260 lines
8.2 KiB
TypeScript
// Type definitions for Interacting for interact.js v1.0.25
|
|
// Project: https://github.com/taye/interact.js
|
|
// Definitions by: Douglas Eichelberger <https://github.com/dduugg>, Adi Dahiya <https://github.com/adidahiya>, Tom Hasner <https://github.com/thasner>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
// API documentation: http://interactjs.io/docs
|
|
|
|
declare namespace Interact {
|
|
interface Interactable {
|
|
// returns Element or string
|
|
accept(): any;
|
|
accept(newValue: Element): Interactable;
|
|
accept(newValue: string): Interactable;
|
|
actionChecker(): Function;
|
|
actionChecker(checker: Function): Interactable;
|
|
// returns boolean or {[key: string]: any}
|
|
autoScroll(): any;
|
|
autoScroll(options: boolean): Interactable;
|
|
autoScroll(options: {[key: string]: any}): Interactable;
|
|
context(): Node;
|
|
defaultActionChecker(event: any): string;
|
|
deltaSource(): string;
|
|
// returns Interactable if newValue is "page" or "client", otherwise returns string
|
|
deltaSource(newValue: String): Interactable;
|
|
draggable(): boolean;
|
|
draggable(options: boolean): Interactable;
|
|
draggable(options: {[key: string]: any}): Interactable;
|
|
dropCheck(event: MouseEvent): boolean;
|
|
dropCheck(event: TouchEvent): boolean;
|
|
dropChecker(): Function;
|
|
dropChecker(checker: Function): Interactable;
|
|
// returns boolean or {[key: string]: any}
|
|
dropzone(): any;
|
|
dropzone(options: boolean): Interactable;
|
|
dropzone(options: {[key: string]: any}): Interactable;
|
|
// return HTMLElement or SVGElement
|
|
element(): Element;
|
|
fire(iEvent: InteractEvent): Interactable;
|
|
// returns boolean or {[key: string]: any}
|
|
gesturable(): any;
|
|
gesturable(options: boolean): Interactable;
|
|
gesturable(options: {[key: string]: any}): Interactable;
|
|
getRect(): ClientRect;
|
|
// returns Element or string
|
|
ignoreFrom(): any;
|
|
ignoreFrom(newValue: string): Interactable;
|
|
ignoreFrom(newValue: Element): Interactable;
|
|
// returns boolean or {[key: string]: any}
|
|
inertia(): any;
|
|
inertia(options: boolean): Interactable;
|
|
inertia(options: {[key: string]: any}): Interactable;
|
|
off(eventType: string, listener: Function, useCapture?: boolean): Interactable;
|
|
on(eventType: string, listener: Function, useCapture?: boolean): Interactable;
|
|
origin(): Point;
|
|
origin(newValue: HTMLElement): Interactable;
|
|
origin(newValue: SVGElement): Interactable;
|
|
origin(newValue: Point): Interactable;
|
|
preventDefault(newValue: boolean | string): Interactable;
|
|
rectChecker(): Function;
|
|
rectChecker(newValue: Function): Interactable;
|
|
resizable(): Interactable;
|
|
resizable(options: boolean): Interactable;
|
|
resizable(options: {[key: string]: any}): Interactable;
|
|
restrict(): Restrict;
|
|
restrict(newValue: Restrict): Interactable;
|
|
set(options: {[key: string]: any}): Interactable;
|
|
// returns boolean or {[key: string]: any}
|
|
snap(): any;
|
|
snap(options: boolean): Interactable;
|
|
snap(options: {[key: string]: any}): Interactable;
|
|
squareResize(): boolean;
|
|
squareResize(newValue: boolean): Interactable;
|
|
styleCursor(): boolean;
|
|
styleCursor(newValue: boolean): Interactable;
|
|
unset(): InteractStatic;
|
|
validateSetting(context: string, option: string, value: any): any;
|
|
}
|
|
|
|
interface Coordinates {
|
|
clientX: number;
|
|
clientY: number;
|
|
pageX: number;
|
|
pageY: number;
|
|
timeStamp: number;
|
|
}
|
|
|
|
interface Debug {
|
|
target: any;
|
|
dragging: any;
|
|
resizing: any;
|
|
gesturing: any;
|
|
prepared: any;
|
|
|
|
prevCoords: Coordinates;
|
|
downCoords: Coordinates;
|
|
|
|
pointerIds: any[];
|
|
pointerMoves: any[];
|
|
addPointer: any;
|
|
removePointer: any;
|
|
recordPointers: any;
|
|
|
|
inertia: InertiaStatus;
|
|
|
|
downTime: any;
|
|
downEvent: any;
|
|
prevEvent: any;
|
|
|
|
Interactable: any;
|
|
IOptions: any;
|
|
interactables: any;
|
|
dropzones: any;
|
|
pointerIsDown: any;
|
|
defaultOptions: any;
|
|
defaultActionChecker: any;
|
|
|
|
actions: any;
|
|
dragMove: any;
|
|
resizeMove: any;
|
|
gestureMove: any;
|
|
pointerUp: any;
|
|
pointerDown: any;
|
|
pointerMove: any;
|
|
pointerHover: any;
|
|
|
|
events: any;
|
|
globalEvents: any;
|
|
delegatedEvents: any;
|
|
}
|
|
|
|
interface InertiaStatus {
|
|
active: boolean;
|
|
target: any;
|
|
targetElement: any;
|
|
|
|
startEvent: any;
|
|
pointerUp: any
|
|
|
|
xe: number;
|
|
ye: number;
|
|
duration: number;
|
|
|
|
t0: number;
|
|
vx0: number;
|
|
vys: number;
|
|
|
|
lambda_v0: number;
|
|
one_ve_v0: number;
|
|
i: any;
|
|
}
|
|
|
|
interface Point {
|
|
x: number;
|
|
y: number;
|
|
}
|
|
|
|
// value types are either ClientRect or Element
|
|
interface Restrict {
|
|
drag?: any;
|
|
gesture?: any;
|
|
resize?: any;
|
|
elementRect?: {[direction: string]: number};
|
|
}
|
|
|
|
interface InteractEvent {
|
|
altKey: boolean;
|
|
axes: string;
|
|
button: number
|
|
clientX0: number;
|
|
clientX: number
|
|
clientY0: number;
|
|
clientY: number
|
|
ctrlKey: boolean
|
|
dt: number;
|
|
duration: number;
|
|
dx: number;
|
|
dy: number;
|
|
metaKey: boolean;
|
|
pageX: number;
|
|
pageY: number;
|
|
shiftKey: boolean;
|
|
speed: number;
|
|
t0: number;
|
|
target: any;
|
|
timeStamp: number;
|
|
type: string;
|
|
velocityX: number;
|
|
velocityY: number;
|
|
x0: number;
|
|
y0: number;
|
|
}
|
|
|
|
interface TouchEvent {
|
|
pageX: number;
|
|
pageY: number;
|
|
type: string;
|
|
}
|
|
|
|
interface InteractStatic {
|
|
(element: HTMLElement): Interactable;
|
|
(element: SVGElement): Interactable;
|
|
(element: string): Interactable;
|
|
(element: string, options: {context: Element}): Interactable;
|
|
// returns boolean or {[key: string]: any}
|
|
autoScroll(): any;
|
|
autoScroll(options: boolean): InteractStatic;
|
|
autoScroll(options: {[key: string]: any}): InteractStatic;
|
|
currentAction(): string
|
|
debug(): Debug;
|
|
deltaSource(): string;
|
|
// "page" and "client" are the valid parameters
|
|
deltaSource(newValue: string): InteractStatic;
|
|
dynamicDrop(): boolean;
|
|
dynamicDrop(newValue: boolean): InteractStatic;
|
|
enableDragging(): boolean;
|
|
enableDragging(newValue: boolean): InteractStatic;
|
|
enableGesturing(): boolean;
|
|
enableGesturing(newValue: boolean): InteractStatic;
|
|
enableResizing(): boolean;
|
|
enableResizing(newValue: boolean): InteractStatic;
|
|
// returns boolean or {[key: string]: any}
|
|
inertia(): any;
|
|
inertia(options: boolean): InteractStatic;
|
|
inertia(options: {[key: string]: any}): InteractStatic;
|
|
isSet(element: Element): boolean;
|
|
margin(): number;
|
|
margin(newvalue: number): InteractStatic;
|
|
off(type: string, listener: Function, useCapture?: boolean): InteractStatic;
|
|
on(type: string, listener: Function, useCapture?: boolean): InteractStatic;
|
|
restrict(): Restrict;
|
|
restrict(newValue: Restrict): InteractStatic;
|
|
simulate(action: string, element: Element, pointerEvent?: any): InteractStatic;
|
|
// returns boolean or {[key: string]: any}
|
|
snap(): any;
|
|
snap(options: boolean): InteractStatic;
|
|
snap(options: {[key: string]: any}): InteractStatic;
|
|
stop(event: Event): InteractStatic;
|
|
styleCursor(): boolean;
|
|
styleCursor(newValue: boolean): InteractStatic;
|
|
supportsTouch(): boolean
|
|
}
|
|
}
|
|
|
|
declare var interact: Interact.InteractStatic;
|
|
|
|
// CommonJS module name until version 1.2.6 is "interact.js"
|
|
declare module "interact.js" {
|
|
export = interact;
|
|
}
|
|
|
|
// CommonJS module name from version 1.2.7 onward is "interactjs"
|
|
declare module "interactjs" {
|
|
export = interact;
|
|
}
|
|
|
|
// AMD module name is "interact"
|
|
declare module "interact" {
|
|
export = interact;
|
|
}
|