Closed
Description
TypeScript cannot determine which Type
is a component or directive. Because template
is from only RenderDirectiveOptions
, TypeScript language service cannot suggest it for autocompletion.
In my opinion, render(Comp, { template })
is a common use-case, and it actually works well. I'm using render(Comp, { template }
for my specs to use it as a living usage documentation at same time.
it('should accept [someFlag]', async () => {
await render(FooComponent, {
template: `<app-foo [someFlag]="true"></app-foo>`
})
});