object-shorthand

This commit is contained in:
Alexander T 2019-06-14 10:38:45 +03:00
parent d7f5def5a3
commit 8896c676be
3 changed files with 5 additions and 5 deletions

View file

@ -110,7 +110,7 @@
"no-unused-expressions": "off",
"no-unused-labels": "error",
"no-var": "off",
"object-shorthand": "off",
"object-shorthand": "error",
"one-var": "off",
"prefer-const": "off",
"prefer-object-spread": "error",

View file

@ -139,9 +139,9 @@ function writeProtocolFile(outputFile: string, protocolTs: string, typeScriptSer
if (protocolDts === undefined) {
const diagHost: ts.FormatDiagnosticsHost = {
getCanonicalFileName: function (f) { return f; },
getCurrentDirectory: function() { return '.'; },
getNewLine: function() { return "\r\n"; }
getCanonicalFileName(f) { return f; },
getCurrentDirectory() { return '.'; },
getNewLine() { return "\r\n"; }
};
const diags = emitResult.diagnostics.map(d => ts.formatDiagnostic(d, diagHost)).join("\r\n");
throw new Error(`Declaration file for protocol.ts is not generated:\r\n${diags}`);

View file

@ -141,7 +141,7 @@ var sys = (function () {
args[i] = WScript.Arguments.Item(i);
}
return {
args: args,
args,
createObject: (typeName: string) => new ActiveXObject(typeName),
write(s: string): void {
WScript.StdOut.Write(s);