allure-npm icon indicating copy to clipboard operation
allure-npm copied to clipboard

TypeScript Support

Open christian-bromann opened this issue 1 year ago • 0 comments

Currently the command line tool has no type support. It would be nice if we could provide a minimal type definition so we can do this in TypeScript without having any type errors thrown:

import allure from 'allure-commandline'
const generation = allure(['generate', 'allure-results'])
return new Promise<void>((resolve, reject) => {
  const generationTimeout = setTimeout(
    () => reject(new Error('Could not generate Allure report')),
    5000)

  generation.on('exit', function() {
    clearTimeout(generationTimeout)
    console.log('Allure report successfully generated')
    resolve()
  })
})

christian-bromann avatar Apr 03 '24 09:04 christian-bromann