inquirer-date-prompt icon indicating copy to clipboard operation
inquirer-date-prompt copied to clipboard

Facing Issue with Using in TypeScript Project,

Open muhammadshahbaz08 opened this issue 1 year ago • 2 comments

Respected @haversnail,

I am Using this library with Inquire in my Type Script Project But, Getting Some Error's. Un-able to find its @types/inquirer-date-prompt & its any resource for Type Script Project.

I'mFacing Module has no default export Error in my tsc file . image

My Dependecies in Pacage.json :

  "dependencies": {
    "@types/inquirer": "^9.0.7",
    "chalk": "^5.3.0",
    "inquirer": "^9.2.12",
    "inquirer-date-prompt": "^3.0.0"
 }

muhammadshahbaz08 avatar Dec 18 '23 07:12 muhammadshahbaz08

+1

d8n1z avatar Feb 05 '24 14:02 d8n1z

+1 same issue.

Were you able to work around it somehow?

UPDATE: was able to workaround by doing the following:

// src/@types/inquirer-date-prompt.d.ts
declare module 'inquirer-date-prompt' {
  import inquirer from 'inquirer';
  const DatePrompt: inquirer.prompts.PromptConstructor;
  export default DatePrompt;
}

es50678 avatar Apr 23 '24 21:04 es50678