mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
[@ember/string] Tests for handlebars SafeString consistency
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { dasherize, camelize, capitalize, classify, decamelize, htmlSafe, loc, underscore, w } from '@ember/string';
|
||||
import { SafeString } from 'handlebars';
|
||||
|
||||
dasherize(); // $ExpectError
|
||||
dasherize('blue man group'); // $ExpectType string
|
||||
@@ -31,3 +32,7 @@ capitalize('', ''); // $ExpectError
|
||||
loc(); // $ExpectError
|
||||
loc("_Hello World"); // $ExpectType string
|
||||
loc("_Hello %@ %@", ["John", "Smith"]); // $ExpectType string
|
||||
|
||||
const handlebarsSafeString: SafeString = htmlSafe('lorem ipsum...');
|
||||
htmlSafe('lorem ipsum...'); // $ExpectType SafeString
|
||||
const regularString: string = htmlSafe('lorem ipsum...'); // $ExpectError
|
||||
|
||||
Reference in New Issue
Block a user