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
Now the actual type of loadConfig().ALLOWED_HOSTS is an array, empty or not. Here the type is incorrect to be string and not string[]. But if I change it I get the error on the line of type: "string":
Type '"string"' is not assignable to type '"array"'.ts(2322)
Prerequisites
Fastify version
4.19.2
Plugin version
No response
Node.js version
20.x
Operating system
Linux
Operating system version (i.e. 20.04, 11.3, 10)
6.4.1
Description
Hello,
I would like to type
ALLOWED_HOSTS
asstring[]
instead ofstring
.Now the actual type of
loadConfig().ALLOWED_HOSTS
is an array, empty or not. Here the type is incorrect to bestring
and notstring[]
. But if I change it I get the error on the line oftype: "string"
:Type '"string"' is not assignable to type '"array"'.ts(2322)
How can I do? Thanks.
Steps to Reproduce
Run:
Error:
Expected Behavior
Type
ALLOWED_HOSTS
as:The text was updated successfully, but these errors were encountered: