Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix render() function return type #29

Closed
szabototo89 opened this issue Jul 5, 2019 · 3 comments
Closed

Fix render() function return type #29

szabototo89 opened this issue Jul 5, 2019 · 3 comments
Labels

Comments

@szabototo89
Copy link
Contributor

szabototo89 commented Jul 5, 2019

https://github.com/testing-library/angular-testing-library/blob/master/projects/testing-library/src/lib/testing-library.ts#L16

There is no explicit type for render function declaration and typescript generates this declaration type file:

// testing-library.d.ts
import { Type } from '@angular/core';
import { RenderOptions } from './models';
export declare function render<T>(template: string, renderOptions: RenderOptions<T>): any;
export declare function render<T>(component: Type<T>, renderOptions?: RenderOptions<T>): any;

Could you specify their return types with RenderResult?

@timdeschryver
Copy link
Member

Thanks for addressing this, this is indeed wrong and the return type should be Promise<RenderResult>.

Do you want to create a Pull Request with a fix?

@szabototo89
Copy link
Contributor Author

Sure, I'll fix it.

@timdeschryver
Copy link
Member

🎉 This issue has been resolved in version 7.0.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants