Optionality here was an unintended side effect of moving to script-mode TypeScript. Unfortunately, TS doesn't handle Proxies very well and thinks that these are undefined (which is technically true until the proxy is called.) TypeScript will hopefully make typing proxies better in the future: https://github.com/microsoft/TypeScript/issues/20846
Based on the tests, there is no change on the external interface caused by the @ts-expect-error, and the routes no longer show as possibly undefined
Optionality here was an unintended side effect of moving to script-mode TypeScript. Unfortunately, TS doesn't handle Proxies very well and thinks that these are undefined (which is technically true until the proxy is called.) TypeScript will hopefully make typing proxies better in the future: https://github.com/microsoft/TypeScript/issues/20846
Based on the tests, there is no change on the external interface caused by the
@ts-expect-error
, and the routes no longer show aspossibly undefined