mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-10-25 12:00:38 +08:00
Add missing API for underscore
Add utility function unescape()
This commit is contained in:
1 parent
3457dff27d
commit
180f50f89f
1 file changed
+19
Vendored
+19
@@ -1442,6 +1442,13 @@ interface UnderscoreStatic {
|
||||
**/
|
||||
escape(str: string): string;
|
||||
|
||||
/**
|
||||
* The opposite of escape, replaces &, <, >, ", and ' with their unescaped counterparts.
|
||||
* @param str HTML escaped string.
|
||||
* @return `str` Raw string.
|
||||
**/
|
||||
unescape(str: string): string;
|
||||
|
||||
/**
|
||||
* If the value of the named property is a function then invoke it; otherwise, return it.
|
||||
* @param object Object to maybe invoke function `property` on.
|
||||
@@ -2283,6 +2290,12 @@ interface Underscore<T> {
|
||||
**/
|
||||
escape(): string;
|
||||
|
||||
/**
|
||||
* Wrapped type `string`.
|
||||
* @see _.unescape
|
||||
**/
|
||||
unescape(): string;
|
||||
|
||||
/**
|
||||
* Wrapped type `object`.
|
||||
* @see _.result
|
||||
@@ -3106,6 +3119,12 @@ interface _Chain<T> {
|
||||
**/
|
||||
escape(): _Chain<T>;
|
||||
|
||||
/**
|
||||
* Wrapped type `string`.
|
||||
* @see _.unescape
|
||||
**/
|
||||
unescape(): _Chain<T>;
|
||||
|
||||
/**
|
||||
* Wrapped type `object`.
|
||||
* @see _.result
|
||||
|
||||
Reference in new issue
Block a user