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
Branch
faucet_type_infer
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 30537
Build 60590: Build Diff
Build 60589: arc lint + arc unit

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