Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a section about Typescript #827

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

cjonasw
Copy link

@cjonasw cjonasw commented May 3, 2021

No description provided.

@timofeysie
Copy link

timofeysie commented May 20, 2022

I'm trying to use it like this:

import * as gmi from 'gm';

export class ImageService {

  findOne(imagePath: string) {
    gmi.(imagePath).identify(function (err, value) {
      console.log(value);
      if (err) {
        console.log(err);
      }
    });
    return `This action returns a #${imagePath} image`;
  }

But the result is:

TypeError: gmi is not a function

@timofeysie
Copy link

Sorry for the consusion. import gm from 'gm'; does work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants