jeroenouw / liftr-tscov

Check the type coverage of any TypeScript project with this easy npm package
https://www.npmjs.com/package/@liftr/tscov
MIT License
30 stars 5 forks source link

es2018 support #7

Open despairblue opened 5 years ago

despairblue commented 5 years ago

Hey, thanks for making this, it's awesome.

What would it take to make it support es2018 as an option for lib and target. And also strict being in the tsconfig, which currently fails:

  _____   ____     ____    ___   __     __
 |_   _| / ___|   / ___|  / _ \  \ \   / /
   | |   \___ \  | |     | | | |  \ \ / / 
   | |    ___) | | |___  | |_| |   \ V /  
   |_|   |____/   \____|  \___/     \_/   

The TypeScript CLI to calculate type coverage
[ { file: undefined,
    start: undefined,
    length: undefined,
    messageText: 'Unknown compiler option \'strict\'.',
    category: 1,
    code: 5023 },
  { file: undefined,
    start: undefined,
    length: undefined,
    messageText:
     'Argument for \'--lib\' option must be:  \'es5\', \'es6\', \'es2015\', \'es7\', \'es2016\', \'es2017\', \'dom\', \'webworker\', \'scripthost\', \'es2015.core\', \'es2015.collection\', \'es2015.generator\', \'es2015.iterable\', \'es2015.promise\', \'es2015.proxy\', \'es2015.reflect\', \'es2015.symbol\', \'es2015.symbol.wellknown\', \'es2016.array.include\', \'es2017.object\', \'es2017.sharedmemory\'',
    category: 1,
    code: 6046 },
  { file: undefined,
    start: undefined,
    length: undefined,
    messageText:
     'Argument for \'--lib\' option must be:  \'es5\', \'es6\', \'es2015\', \'es7\', \'es2016\', \'es2017\', \'dom\', \'webworker\', \'scripthost\', \'es2015.core\', \'es2015.collection\', \'es2015.generator\', \'es2015.iterable\', \'es2015.promise\', \'es2015.proxy\', \'es2015.reflect\', \'es2015.symbol\', \'es2015.symbol.wellknown\', \'es2016.array.include\', \'es2017.object\', \'es2017.sharedmemory\'',
    category: 1,
    code: 6046 },
  { file: undefined,
    start: undefined,
    length: undefined,
    messageText:
     'Argument for \'--target\' option must be:  \'es3\', \'es5\', \'es6\', \'es2015\'',
    category: 1,
    code: 6046 } ]
  _____   ____     ____    ___   __     __
 |_   _| / ___|   / ___|  / _ \  \ \   / /
   | |   \___ \  | |     | | | |  \ \ / / 
   | |    ___) | | |___  | |_| |   \ V /  
   |_|   |____/   \____|  \___/     \_/   

The TypeScript CLI to calculate type coverage
[ { file: undefined,
    start: undefined,
    length: undefined,
    messageText: 'Unknown compiler option \'strict\'.',
    category: 1,
    code: 5023 },
  { file: undefined,
    start: undefined,
    length: undefined,
    messageText:
     'Argument for \'--lib\' option must be:  \'es5\', \'es6\', \'es2015\', \'es7\', \'es2016\', \'es2017\', \'dom\', \'webworker\', \'scripthost\', \'es2015.core\', \'es2015.collection\', \'es2015.generator\', \'es2015.iterable\', \'es2015.promise\', \'es2015.proxy\', \'es2015.reflect\', \'es2015.symbol\', \'es2015.symbol.wellknown\', \'es2016.array.include\', \'es2017.object\', \'es2017.sharedmemory\'',
    category: 1,
    code: 6046 },
  { file: undefined,
    start: undefined,
    length: undefined,
    messageText:
     'Argument for \'--lib\' option must be:  \'es5\', \'es6\', \'es2015\', \'es7\', \'es2016\', \'es2017\', \'dom\', \'webworker\', \'scripthost\', \'es2015.core\', \'es2015.collection\', \'es2015.generator\', \'es2015.iterable\', \'es2015.promise\', \'es2015.proxy\', \'es2015.reflect\', \'es2015.symbol\', \'es2015.symbol.wellknown\', \'es2016.array.include\', \'es2017.object\', \'es2017.sharedmemory\'',
    category: 1,
    code: 6046 },
  { file: undefined,
    start: undefined,
    length: undefined,
    messageText:
     'Argument for \'--target\' option must be:  \'es3\', \'es5\', \'es6\', \'es2015\'',
    category: 1,
    code: 6046 } ]
jeroenouw commented 5 years ago

@despairblue, you can make a PR with the changes needed for this. By adding es2018 to lib. strict was already in the tsconfig: "strict": true,