Riron / ionic-img-viewer

Ionic 2+ component providing a Twitter inspired experience to visualize pictures.
MIT License
283 stars 118 forks source link

Type 'any' is not a constructor function type. #59

Closed milanjya closed 7 years ago

milanjya commented 7 years ago

image

Help.

milanjya commented 7 years ago

my ionic is v3.3.0 can it work?

gunjank commented 7 years ago

I was able to fix this in local by using correct import path "drag-gesture.

import { PanGesture } from '../../gestures/drag-gesture';

Riron commented 7 years ago

It should be fixed in latest release - please upgrade. Thanks !

milanjya commented 7 years ago

thank's @Riron @gunjank

smkamranqadri commented 7 years ago

Issue not resolved yet.

`[13:54:35] typescript: ...de_modules/ionic-img-viewer/dist/es2015/src/image-viewer-transition-gesture.d.ts, line: 6 Type 'any' is not a constructor function type.

   L5:  import { DomController } from 'ionic-angular';
   L6:  export declare class ImageViewerTransitionGesture extends PanGesture {
   L7:      private component;

[13:54:35] typescript: node_modules/ionic-img-viewer/dist/es2015/src/image-viewer.d.ts, line: 5 Type 'any' is not a constructor function type.

   L4:  import { ImageViewerComponent } from './image-viewer.component';
   L5:  export declare class ImageViewer extends OverlayProxy {
   L6:      private opts;

[13:54:35] typescript: node_modules/ionic-img-viewer/dist/es2015/src/image-viewer.d.ts, line: 8 Cannot find name 'Overlay'.

   L7:      constructor(app: App, component: typeof ImageViewerComponent, opts: ImageViewerOptions, config: Config, deepLinker: DeepLinker);
   L8:      getImplementation(): Overlay;

`

Riron commented 7 years ago

Check your dependencies versions. If the problem persists open a new issue with your detailed versions.

smkamranqadri commented 7 years ago

I installed v1 which is working fine but latest version should work.

HZooly commented 6 years ago

@Riron last version (2.9.0) still not working, I had to use v1.3.1 with Ionic.