forked from jscheid/prettier.el
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexterns.js
69 lines (62 loc) · 1.6 KB
/
externs.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
var process = {
exit: function() {},
env: {},
version: {},
stdin: {},
stdout: {}
};
// var Buffer = {
// from: function() {},
// alloc: function() {},
// concat: function() {}
// };
var global;
var console;
function require(name) {}
/**
* @interface
*/
function Buffer() {}
/**
* @param {!string} str
* @param {?string=} encoding
*/
Buffer.from = function(str, encoding) {};
Buffer.alloc = function(size) {};
Buffer.concat = function(bufs) {};
/**
* @override
* @suppress{checkTypes}
* @param{!string} encoding
* @param{number=} ofs
* @param{number=} len
*/
Buffer.prototype.toString = function(encoding, ofs, len) {};
/**
* @param{!number} chr
* @param{number=} ofs
*/
Buffer.prototype.indexOf = function(chr, ofs) {};
Buffer.prototype.slice = function(ofs, len) {};
Buffer.prototype.length;
Buffer.prototype.writeUInt32LE = function(val, ofs) {};
/**
* @interface
*/
function PrettierAPI() {}
PrettierAPI.prototype.resolveConfig = function(filePath, options, callback) {};
/**
* @param {!string} filePath
* @param {?{editorconfig: (boolean|undefined), useCache: (boolean|undefined)}=} options
*/
PrettierAPI.prototype.resolveConfig.sync = function(filePath, options) {};
PrettierAPI.prototype.format = function(body, options) {};
/**
* @return {{formatted: !string}}
*/
PrettierAPI.prototype.formatWithCursor = function(body, options) {};
PrettierAPI.prototype.getSupportInfo = function() {};
PrettierAPI.prototype.getFileInfo = function(filePath, options, callback) {};
PrettierAPI.prototype.getFileInfo.sync = function(filePath, options) {};
/** @type {string} */
PrettierAPI.prototype.version;