Open alvinfebriando opened 4 years ago
I think it is possible to use this library with typescript without any modifications.
But I guess the type hinting for the options could be supplied. I am not familiar with typescript, so any suggestion/explanation of how this could work is welcome.
For those who need a quick fix until the actual types land, here's what I'm doing:
_inquirer-autocomplete-prompt.d.ts
somewhere reachable from your code, e.g. in src
, with this content:
declare module 'inquirer-autocomplete-prompt'
import autocomplete from 'inquirer-autocomplete-prompt'
:
/// <reference path='_inquirer-autocomplete-prompt.d.ts'/>
I have no errors and the whole thing works.
I will review the PR to help this along. Fixing it is out of scope for now, though, due to other work.
Type definitions are in DefinitelyTyped/inquirer-autocomplete-prompt (project page)
Just need to import @types/inquirer-autocomplete-prompt
How to use this library with typescript? It's said no typings were found