Official documentation indicates we should import `htmlSafe` from `@ember/template`
See original GitHub issueWhich package(s) does this problem pertain to?
What are instructions we can follow to reproduce the issue?
add this line to any ember .ts
file:
import { htmlSafe } from '@ember/template';
and you will get a TypeScript error despite the fact that official documentation indicates that this is where the import should come from. Instead, we have to import from @ember/string
.
Now about that bug. What did you expect to see?
Clean import with no TS errors.
What happened instead?
TypeScript complains of not being able to find type info for htmlSafe
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
ember/template should be typed · Issue #342 - GitHub
TypeScript complains Cannot find module '@ember/template'. ... Official documentation indicates we should import htmlSafe from @ember/template #784.
Read more >htmlSafe - 4.8 - Ember API Documentation
Use this method to indicate that a string should be rendered as HTML when the string is used in a template. ... import...
Read more >ember-froala-editor - npm
An ember-cli addon that properly wraps the Froala WYSIWYG Editor for use in Ember.js. Latest version: 4.0.15, last published: a day ago.
Read more >ember app - OSCHINA - 中文开源技术交流社区
This addon provides a way to defer work into different paint phases of the rendering process to get a faster FMP. It also...
Read more >Show property which includes html tags - ember.js
Within Ember.js you can do this via the htmlSafe method, which is added to ... The returned string will not be HTML escaped...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Possible duplicate #342
Thank you for opening this! If you open a PR against DefinitelyTyped adding it (including some tests) we’d be happy to review!