Skip to content

TypeScript Type: api.tags parameter order #543

@zoeytruong

Description

@zoeytruong

Bug report for Cloudinary NPM SDK

version: "^1.28.1"

Describe the bug in a sentence or two.

  • In the node SDK doc for Get Tags, it shows that I can pass in an object for options. The doc shows passing in the options obj as the first param, then the callback function.

  • However, in the TS type definition for tags, it shows that callback is the first param and then options. I am trying to use node util.promisify for this api.tags function so am wondering why Cloudinary has callback as the first param. If callback is the second param in tags, then I can call util.promisify on this method.

  • Tested by calling .tags with callback as first argument and that fails.

Issue Type (Can be multiple)

[ ] Build - Can’t install or import the SDK
[ ] Babel - Babel errors or cross browser issues
[ ] Performance - Performance issues
[ ] Behaviour - Functions aren’t working as expected (Such as generate URL)
[ ] Documentation - Inconsistency between the docs and behaviour
[X] Incorrect Types - For typescript users who are having problems with our d.ts files
[ ] Other (Specify)

Steps to reproduce

… if applicable

Error screenshots

… if applicable

Browsers (if issue relates to UI, else ignore)

[ ] Chrome
[ ] Firefox
[ ] Safari
[ ] Other (Specify)
[ ] All

Versions and Libraries (fill in the version numbers)

Cloudinary_NPM SDK version
Node - 0.0.0
NPM - 0.0.0

Config Files (Please paste the following files if possible)

Package.json

Repository

If possible, please provide a link to a reproducible repository that showcases the problem

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions