Skip to content

correctly type return/resolved values instead of any #409

@kilianc

Description

@kilianc

Is your feature request related to a problem?

const { question } = await prompts({
  type: 'text',
  name: 'question',
  message: 'what do you want to ask?'
})

question is incorrectly typed as any instead of string

Describe the solution you'd like

Better return types

Describe alternatives you've considered

const { question }: { question: string}  = await prompts({
  type: 'text',
  name: 'question',
  message: 'what do you want to ask?'
})

Additional context

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions