Jquery cropper (#42973)

* commit jquery-croper type definitions

commit jquery-croper type definitions

* Update index.d.ts

Update index.d.ts, correcting the version of the cropper and remove unnecessary comments.

* update tsconfig

Adding "strictFunctionTypes": true to tsconfig.json file.

* Update index.d.ts & tslint.json

Removing
declare module "jquery-cropper" {
}, and fixing the Project url

* update "interface-name" property

set "interface-name" property to false in tslint.json

* update tslint

* remove the patch version from index.d.ts

* update rules in tslint.json

* completely remove the patch digit

* remove "v" from MAJOR.MINOR

* Update tslint.json

enabled interface-name property

* adjust interface-name rule

adjust interface-name rule to "interface-name": [true, "never-prefix"]

* remove I from interface name

remove I from interface name

* added new line to last line

added new line to last line
This commit is contained in:
Mustafa Salaheldin
2020-03-12 12:11:32 -07:00
committed by GitHub
parent 94590b4029
commit 0b34e65eb9
3 changed files with 83 additions and 0 deletions
+54
View File
@@ -0,0 +1,54 @@
// Type definitions for jquery-cropper 1.0
// Project: https://github.com/fengyuanchen/jquery-cropper
// Definitions by: Mustafa Salaheldin <https://github.com/mustafasalahuldin>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
/// <reference types="jquery"/>
interface CropperOptions {
viewMode?: number;
dragMode?: string;
initialAspectRatio?: number;
aspectRatio?: number;
data?: any;
preview?: any;
responsive?: boolean;
restore?: boolean;
checkCrossOrigin?: boolean;
checkOrientation?: string;
modal?: boolean;
guides?: boolean;
center?: boolean;
highlight?: boolean;
background?: boolean;
autoCrop?: boolean;
autoCropArea?: number;
movable?: boolean;
rotatable?: boolean;
scalable?: boolean;
zoomable?: boolean;
zoomOnTouch?: boolean;
zoomOnWheel?: boolean;
wheelZoomRatio?: number;
cropBoxMovable?: number;
cropBoxResizable?: number;
toggleDragModeOnDblclick?: number;
minContainerWidth?: number;
minContainerHeight?: number;
minCanvasWidth?: number;
minCanvasHeight?: number;
minCropBoxWidth?: number;
minCropBoxHeight?: number;
ready?(): any;
cropstart?(): any;
cropmove?(): any;
cropend?(): any;
crop?(data?: any): void;
zoom?(): any;
}
interface JQuery {
cropper(options?: CropperOptions): JQuery;
cropper(method: string, ...arguments: any[]): JQuery;
}
+23
View File
@@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"dom",
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts"
]
}
+6
View File
@@ -0,0 +1,6 @@
{
"extends": "dtslint/dt.json",
"rules": {
"interface-name": [true, "never-prefix"]
}
}