I can't use it right for some reason and I want to figure out what I am doing wrong.
Compiling the code with our tsconfig.json
and running it causes no issues:
$ npm run demo
> @ demo .../4933199b29fa2aaf69ef8a3a155183eb
> tsc && node index.js
Credentials { name: 'un', pass: 'pw' }
However, tslint
is unhappy:
$ npm run tslint
> @ tslint .../4933199b29fa2aaf69ef8a3a155183eb
> tslint -c tslint.js --project tsconfig.json index.ts
ERROR: .../4933199b29fa2aaf69ef8a3a155183eb/index.ts:14:50 - Unsafe use of expression of type 'any'.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! @ tslint: `tslint -c tslint.js --project tsconfig.json index.ts`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the @ tslint script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! ${HOME}/.npm/_logs/2019-02-21T01_37_24_378Z-debug.log
This is because the use of
declare module 'basic-auth'
in common.d.ts
removes any usefulness of @types/basic-auth
.