yan-foto/electron-reload

Wrong typing of ARGV in typescript definition

Milly opened this issue · 0 comments

Milly commented

What is the problem

Wrong typing of ARGV in typescript definition.
Both appArgv and electronArgv should be arrays, not tuples.

How to reproduce

// reload.ts
import electronReload from 'electron-reload';
electronReload(__dirname, {
  appArgv: ['--foo', '--bar'],
});
$ tsc --noEmit reload.ts
reload.ts:3:3 - error TS2322: Type '[string, string]' is not assignable to type '[string]'.
  Source has 2 element(s) but target allows only 1.

3   appArgv: ['--foo', '--bar'],
    ~~~~~~~