Commit Graph

15 Commits

Author SHA1 Message Date
Adam
0b111f9e2b
Update index.d.ts 2018-11-30 08:14:29 +01:00
Adam
aa0097e633
fix travis errors 2018-11-29 08:52:59 +01:00
Adam
860b409ed9
Update index.d.ts with replace function overload
Change due to the documentation of cropperjs (https://www.npmjs.com/package/cropperjs#replaceurl-hassamesize).
2018-11-22 15:51:55 +01:00
Andy
141d1cc870
And tslint disables for no-angle-bracket-type-assertion (#30592) 2018-11-16 12:20:58 -08:00
Don Denton
932727f578 Use partials for setting methods which take options (#24959)
This commit addresses a problem where the following would produce a type
error, even though it was valid code:

```typescript
setCanvasData({left: 23})
```

I have changed the argument type for all of the `setXXX` methods which
accept an object as their argument. In the spec files for cropperjs,
@fengyuanchen uses these objects as partials for setters. So I have
made the type definitions follow that same pattern.

I changed the `cropperjs.CropBoxData` type to act the same way as well.
It looks like  it was changed at some point, I am guessing to allow it
to be used as a partial in the `setCropBoxData` method. Since, like all
the other data structures here, it contains all members when you `get`
it, I have made all members required parts of the object and changed
the setter method to accept a partial.

I hope this all makes sense. Basically, I went from the first line below
to the second.

```typescript
setXXXXX(thing: cropperjs.SomeInterface): void

setXXXXX(thing: Partial<cropperjs.SomeInterface>): void
```

Then I changed `cropperjs.CropBoxData` to fit this new system.
2018-04-17 18:12:42 -07:00
Andy Hanson
45c9246c09 Remove esModuleInterop from tsconfigs (no longer mandatory) 2018-02-14 14:55:13 -08:00
Andy
bef4d2b27d
Enable "esModuleInterop" in all tsconfigs (#23354) 2018-02-05 11:01:56 -08:00
Alex Koehler
9cbe2c5459 Added scale, scaleX and scaleY functions to cropperjs class type. (#23150) 2018-01-29 12:31:57 -08:00
Job
2495d307b0 cropperjs: add image smoothing options (#22621) 2018-01-03 00:39:48 -08:00
ohze.net
b731a1b609 cropperjs: make CropBoxData's fields optional; add getCroppedCanvas (v1.1.0) 's new options; add & fix tslint (#20560)
* cropperjs: make CropBoxData's fields optional

* cropperjs: Added 4 new options to getCroppedCanvas method: minWidth, minHeight, maxWidth and maxHeight.

see https://github.com/fengyuanchen/cropperjs/releases/tag/v1.1.0

* cropperjs: tslint
2017-10-23 12:48:02 -07:00
Andy
947a8fb761 Enable strictFunctionTypes (#20373) 2017-10-06 14:03:03 -07:00
Christopher Blum
09d7614303 cropperjs - Added checkOrientation option 2017-05-19 18:41:37 +02:00
apollocoder
407cace6b4 Update index.d.ts (#16119)
Added missing restore option
2017-05-04 18:19:11 -07:00
Phoenix359
893a6331ba cropperjs - Added the methods: zoomTo & rotateTo and the event: zoom (#15591)
* Added the methods: `zoomTo` & `rotateTo` and the event: `zoom`

Also changed the 6 events to have the correct (different) interface for the property: detail.

* Updated react-cropper to newest cropperjs
2017-04-24 07:56:09 -07:00
Andy Hanson
354cec620d Move all packages to a types directory 2017-03-24 14:27:52 -07:00