question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Official documentation indicates we should import `htmlSafe` from `@ember/template`

See original GitHub issue

Which 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:closed
  • Created 4 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
mschorschcommented, Oct 11, 2019

Possible duplicate #342

1reaction
chriskrychocommented, Aug 1, 2019

Thank you for opening this! If you open a PR against DefinitelyTyped adding it (including some tests) we’d be happy to review!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found