Types for the `ng` angular module

Viewed 53

I want to use ng.getComponent() that has been introduced in Angular 9. Typescript does not seem to find a type for ng: TS2304: Cannot find name 'ng'.

When I @ts-ignore it, the function works just fine.

const aop = ctx.query('app-object-properties');
// @ts-ignore
const comp = ng.getComponent(aop) as ObjectPropertiesComponent<Person>;
expect(comp.object).toEqual({ });
0 Answers
Related