Skip to content

Commit

Permalink
Make SafeString show up correctly in docs
Browse files Browse the repository at this point in the history
(cherry picked from commit 5378cfe)
  • Loading branch information
chriskrycho authored and kategengler committed Feb 20, 2023
1 parent 8c2f360 commit b72b9a7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/@ember/-internals/glimmer/lib/utils/string.ts
Expand Up @@ -32,9 +32,10 @@ import type { SafeString as GlimmerSafeString } from '@glimmer/runtime';
htmlSafe(someTrustedorSanitizedString);
```
@public
@since 4.12.0
@for @ember/template
@class SafeString
@since 4.12.0
@public
*/
export class SafeString implements GlimmerSafeString {
private __string: string;
Expand All @@ -48,7 +49,7 @@ export class SafeString implements GlimmerSafeString {
@public
@method toString
@returns The string marked as trusted
@returns {String} The string marked as trusted
*/
toString(): string {
return `${this.__string}`;
Expand All @@ -59,7 +60,7 @@ export class SafeString implements GlimmerSafeString {
@public
@method toHTML
@returns string
@returns {String} the trusted string, without any escaping applied
*/
toHTML(): string {
return this.toString();
Expand Down
1 change: 1 addition & 0 deletions tests/docs/expected.js
Expand Up @@ -509,6 +509,7 @@ module.exports = {
'toArray',
'toggleProperty',
'toString',
'toHTML',
'tracked',
'transitionTo',
'transitionToRoute',
Expand Down

0 comments on commit b72b9a7

Please sign in to comment.