usablica / intro.js

Lightweight, user-friendly onboarding tour library
http://introjs.com
Other
22.76k stars 2.59k forks source link

Type definitions for returned type do not match the actual codes return type #1935

Closed thaneuk closed 1 year ago

thaneuk commented 1 year ago

https://github.com/usablica/intro.js/blob/0dae1dc925dd68babf53881e1e4c6ec8f30f6948/src/index.ts#LL152C6-L152C6

Async functions return a Promise, type definitions state the start method returns IntroJs. It should state it returns Promise<IntroJs>. There are other functions/methods that are incorrectly typed as well in the latest type definition "@types/intro.js": "^5.1.1".

interface IntroJs { start(): IntroJs; exit(force?: boolean): IntroJs; clone(): IntroJs;

afshinm commented 1 year ago

This will be fixed in the next version.