This commit is contained in:
zino
2021-03-02 00:06:38 +01:00
parent 3a8aab0e9a
commit eeb745b013
3567 changed files with 1234741 additions and 0 deletions

28
client/node_modules/tsify/lib/CompileError.js generated vendored Normal file
View File

@@ -0,0 +1,28 @@
'use strict';
var os = require('os');
module.exports = function (ts) {
function CompileError(diagnostic) {
SyntaxError.call(this);
this.message = '';
if (diagnostic.file) {
var loc = ts.getLineAndCharacterOfPosition(diagnostic.file, diagnostic.start);
this.fileName = diagnostic.file.fileName;
this.line = loc.line + 1;
this.column = loc.character + 1;
this.message += this.fileName + '(' + this.line + ',' + this.column + '): ';
}
var category = ts.DiagnosticCategory[diagnostic.category];
this.name = 'TypeScript error';
this.message += category + ' TS' + diagnostic.code + ': ' +
ts.flattenDiagnosticMessageText(diagnostic.messageText, os.EOL);
}
CompileError.prototype = Object.create(SyntaxError.prototype);
return CompileError;
};