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

Typescript support? #6

Open
GiovanniCardamone opened this issue Sep 15, 2021 · 6 comments
Open

Typescript support? #6

GiovanniCardamone opened this issue Sep 15, 2021 · 6 comments

Comments

@GiovanniCardamone
Copy link

Hello, can you add typescript support for this lib?

@metafloor
Copy link
Owner

I don't use typescript. Not even sure how to add it...

@GiovanniCardamone
Copy link
Author

what if i make a pr? Will you consider it?

@metafloor
Copy link
Owner

Sure. Happy to accept it.

@GiovanniCardamone
Copy link
Author

ill write d.ts file in a copule of days so :D

@aarajput
Copy link

@GiovanniCardamone , did you get the chance to write its typescript. I am also looking for its d.ts file.

@GiovanniCardamone
Copy link
Author

GiovanniCardamone commented May 22, 2022

@aarajput i did just what i needed

you can start from here:

declare module 'zpl-image' {
  interface Options {
    black: number
    rotate?: 'R' | 'B' | 'L' | 'I'
    notrim?: boolean
  }

  interface ZplImage {
    length: number
    rowlen: number
    width: number
    height: number
    z64: string
  }

  export function rgbaToZ64(
    rgba: Buffer,
    width: number,
    options: Options
  ): ZplImage

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

No branches or pull requests

3 participants