UNPKG

1.48 kBJavaScriptView Raw
1/**
2 * @fileoverview Minimal environment for bcrypt.js.
3 * @externs
4 */
5
6/**
7 * @param {string} moduleName
8 * returns {*}
9 */
10function require(moduleName) {}
11
12/**
13 * @constructor
14 * @private
15 */
16var Module = function() {};
17
18/**
19 * @type {*}
20 */
21Module.prototype.exports;
22
23/**
24 * @type {Module}
25 */
26var module;
27
28/**
29 * @type {string}
30 */
31var __dirname;
32
33/**
34 * @type {Object.<string,*>}
35 */
36var process = {};
37
38/**
39 * @param {function()} func
40 */
41process.nextTick = function(func) {};
42
43/**
44 * @param {string} s
45 * @constructor
46 * @extends Array
47 */
48var Buffer = function(s) {};
49
50/**
51 BEGIN_NODE_INCLUDE
52 var crypto = require('crypto');
53 END_NODE_INCLUDE
54 */
55
56/**
57 * @type {Object.<string,*>}
58 */
59var crypto = {};
60
61/**
62 * @param {number} n
63 * @returns {Array.<number>}
64 */
65crypto.randomBytes = function(n) {};
66
67/**
68 * @type {Object.<string,*>}
69 */
70window.crypto = {};
71
72/**
73 * @param {Uint8Array|Int8Array|Uint16Array|Int16Array|Uint32Array|Int32Array} array
74 */
75window.crypto.getRandomValues = function(array) {};
76
77/**
78 * @param {string} name
79 * @param {function(...[*]):*} constructor
80 */
81var define = function(name, constructor) {};
82
83/**
84 * @type {boolean}
85 */
86define.amd;
87
88/**
89 * @param {...*} var_args
90 * @returns {string}
91 */
92String.fromCodePoint = function(var_args) {};
93
94/**
95 * @param {number} offset
96 * @returns {number}
97 */
98String.prototype.codePointAt = function(offset) {};