`SafeString` is "private"
See original GitHub issueWhich package(s) does this problem pertain to?
- @types/ember
- @types/ember__string
- @types/ember__polyfills
- @types/ember__object
- @types/ember__utils
- @types/ember__array
- @types/ember__engine
- @types/ember__debug
- @types/ember__runloop
- @types/ember__error
- @types/ember__controller
- @types/ember__component
- @types/ember__routing
- @types/ember__application
- @types/ember__template
- @types/ember__test
- @types/ember__test-helpers
- @types/ember__service
- @types/ember-data
- @types/rsvp
- Other
- I don’t know
What are instructions we can follow to reproduce the issue?
There is no public re-export of SafeString
, which is the return type of htmlSafe
. If you have a function or getter that returns the result of calling htmlSafe
, the return type is “unnamable”. There are workarounds, like RetrunType<typeof htmlSafe>
, but 😬
Reproduction Case
import { htmlSafe } from '@ember/tempalte';
export function myFunc(str: string): ??? {
return htmlSafe(str);
}
Now about that bug. What did you expect to see?
Something I can import to fill in the ???
.
What happened instead?
There is nothing I can import to fill in the ???
.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top Results From Across the Web
The SafeString alternative to Arduino Strings for Beginners ...
This SafeString library is designed for beginners to be a safe, robust and debuggable replacement for string processing in Arduino. This ...
Read more >Using the SafeString library - Arduino Forum
This topic is open to questions about how to apply my SafeString library to particular cases. (The SafeString library can be installed from ......
Read more >Making a Java SafeString that works with all unicode characters
John Shepard shows us how to write a safe string that supports all unicode characters. ... private String testString = new StringBuilder().
Read more >SafeString Alternative to Arduino Strings for Beginners
1. Installation of SafeString library:
SafeString is now available via the Arduino Library Manager, thanks to Va_Tech_EE
Start the Arduino IDE, open the ... 2....
Read more >'SafeString' object has no attribute 'get' - Stack Overflow
def your_function(request): ......# your queries context = { 'order': order,'ordered_items': ordered_items,'change': change} html ...
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
(By the way, the issue templates are missing
@types/ember__template
)I actually use
import { SafeString } from 'handlebars';
and that seems to work. But I also useimport { htmlSafe } from '@ember/string';
which is different fromimport { htmlSafe } from '@ember/tempalte';
… in some way? Not sure why that function is exported from two different packages. Is it different in some way?