mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-12 12:10:44 +08:00
added definitions for jsesc
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
/// <reference path="jsesc.d.ts" />
|
||||
|
||||
import jsesc = require('jsesc');
|
||||
import Opts = jsesc.Opts;
|
||||
|
||||
// ---- ---- ---- ---- ---- ---- ----
|
||||
|
||||
var num: number;
|
||||
var str: string;
|
||||
var bool: boolean;
|
||||
var opts: Opts;
|
||||
var opts: Opts;
|
||||
|
||||
// ---- ---- ---- ---- ---- ---- ----
|
||||
|
||||
str = jsesc.version;
|
||||
|
||||
// ---- ---- ---- ---- ---- ---- ----
|
||||
|
||||
opts = {
|
||||
quotes: str
|
||||
};
|
||||
opts = {
|
||||
wrap: bool
|
||||
};
|
||||
opts = {
|
||||
es6: bool
|
||||
};
|
||||
opts = {
|
||||
escapeEverything: bool
|
||||
};
|
||||
opts = {
|
||||
compact: bool
|
||||
};
|
||||
opts = {
|
||||
indent: str
|
||||
};
|
||||
opts = {
|
||||
json: bool
|
||||
};
|
||||
|
||||
// ---- ---- ---- ---- ---- ---- ----
|
||||
|
||||
str = jsesc(str);
|
||||
str = jsesc(str, opts);
|
||||
Reference in New Issue
Block a user