You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// don't use well known portsconstisPort=isOneOf([isLiteral(0),cascade(isNumber(),isInteger(),isPositive(),isInInclusiveRange(1024,65535))],{exclusive: true},)exportclassAppextendsCommand{readonlyport=Option.String('--port','0',{validator: isPort})staticreadonlypaths=[Command.Default]}
unfortunately OptionString cannot take a number, and so literal 0 will fail
❯ yarn workspace @cof/e1-fake-chamber-of-secrets serve
Usage Error: Invalid value for port:
- .#1: Expected 0 (got "0")
- .#2: Expected to be in the [1024; 65535] range (got 0)
I guess my suggestion for a fix would be to allow a subset of primitives to Option.String fortunately express seems ok with the string
The text was updated successfully, but these errors were encountered:
unfortunately
OptionString
cannot take a number, and so literal 0 will failI guess my suggestion for a fix would be to allow a subset of primitives to
Option.String
fortunately express seems ok with the stringThe text was updated successfully, but these errors were encountered: