Does anyone have any insight as to why my custom `...
# kubernetes
l
Does anyone have any insight as to why my custom
IngressRoute
type (TypeScript) is throwing
TypeError: types_1.IngressRoute is not a constructor
?
Copy code
import { IngressRoute } from '../types'
export const ingressRouteHttp: IngressRoute = new IngressRoute('ingress-http', { /* Stuff */ })
b
any is not an object in typescript so has no constructor https://www.typescriptlang.org/docs/handbook/basic-types.html#any
when you do a new, you have to know what you instantiate
l
ah, thanks!
At least it’ll force me to type-ify it