Advertisement
Guest User

Untitled

a guest
Mar 20th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. import {fabric} from 'fabric';
  2.  
  3. declare module 'fabric' {
  4. namespace fabric {
  5. interface Object {
  6. id: string;
  7. depth?: number;
  8. formulaX?: string;
  9. formulaY?: string;
  10. formulaWidth?: string;
  11. formulaHeight?: string;
  12. formulaRotation?: string;
  13. syncWithVariable?: string;
  14. }
  15. interface IObjectOptions {
  16. canvas?: fabric.Canvas
  17. }
  18. }
  19. }
  20.  
  21.  
  22. let foobar: fabric.Object = ...;
  23. foo.id = 'blarblar'; // OK
  24. const left = foo.get('left'); // OK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement