Page MenuHomePhabricator

[faucet] Help typescript to infer the type of an empty array
ClosedPublic

Authored by Fabien on Wed, Oct 9, 19:02.

Details

Summary

In the config file the originWhitelist array is documented as possibly empty. This means that typescript has to infer the type from [] which causes a compilation failure.

Test Plan

Empty the array and run npm run build.

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Fabien requested review of this revision.Wed, Oct 9, 19:02
bytesofman added a subscriber: bytesofman.

possibly overkill for this app, but you can see how config.ts defines an interface in token-server to handle this

This revision is now accepted and ready to land.Wed, Oct 9, 19:49