https://pulumi.com logo
#kubernetes
Title
# kubernetes
l

lemon-monkey-228

02/12/2021, 11:48 AM
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

bumpy-laptop-30846

02/12/2021, 1:06 PM
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

lemon-monkey-228

02/15/2021, 8:19 AM
ah, thanks!
At least it’ll force me to type-ify it
4 Views