mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-19 10:41:56 -05:00
Use __filename for 'getExecutingFilePath'.
This commit is contained in:
@@ -25,6 +25,7 @@ declare var require: any;
|
||||
declare var module: any;
|
||||
declare var process: any;
|
||||
declare var global: any;
|
||||
declare var __filename: string;
|
||||
|
||||
var sys: System = (function () {
|
||||
|
||||
@@ -224,10 +225,10 @@ var sys: System = (function () {
|
||||
}
|
||||
},
|
||||
getExecutingFilePath() {
|
||||
return process.mainModule.filename;
|
||||
return __filename;
|
||||
},
|
||||
getCurrentDirectory() {
|
||||
return (<any>process).cwd();
|
||||
return process.cwd();
|
||||
},
|
||||
getMemoryUsage() {
|
||||
if (global.gc) {
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
// this will work in the browser via browserify
|
||||
var _chai: typeof chai = require('chai');
|
||||
var assert: typeof _chai.assert = _chai.assert;
|
||||
declare var __dirname: any; // Node-specific
|
||||
declare var __dirname: string; // Node-specific
|
||||
var global = <any>Function("return this").call(null);
|
||||
|
||||
module Utils {
|
||||
|
||||
Reference in New Issue
Block a user