-
Notifications
You must be signed in to change notification settings - Fork 319
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
TypeScript: LitElement.render returns TemplateResult | void #874
Comments
does it make sense in some cases, for a component to return |
There's already a |
lit-element docs says:
lit-html docs says:
From my experience with TypeScript, returning an empty string resulted in compile error:
And not returning anything (equal to returning I usually do this to return an empty thing, and it works: return html``; |
|
Description
LitElement.render
returnsTemplateResult|void
, which makes it look less type safe for typescript users.Source code of
lit-element.ts
:Wondering if it's possible to make it an abstract function with only
TemplateResult
as return type,Steps to Reproduce
Expected Results
TypeScript compile error.
Actual Results
Compiles fine on strict mode.
Versions
The text was updated successfully, but these errors were encountered: