mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-15 03:23:08 -06:00
Bind console log method so it works in the browser
This commit is contained in:
parent
0a9fb1a7b5
commit
6caec671ec
@ -493,7 +493,7 @@ module Harness {
|
||||
export let readFile: typeof IO.readFile = ts.sys.readFile;
|
||||
export let writeFile: typeof IO.writeFile = ts.sys.writeFile;
|
||||
export let fileExists: typeof IO.fileExists = fs.existsSync;
|
||||
export let log: typeof IO.log = console.log;
|
||||
export let log: typeof IO.log = console.log.bind(console);
|
||||
|
||||
export function createDirectory(path: string) {
|
||||
if (!directoryExists(path)) {
|
||||
@ -673,7 +673,7 @@ module Harness {
|
||||
};
|
||||
export let listFiles = Utils.memoize(_listFilesImpl);
|
||||
|
||||
export let log = console.log;
|
||||
export let log = console.log.bind(console);
|
||||
|
||||
export function readFile(file: string) {
|
||||
let response = Http.getFileFromServerSync(serverRoot + file);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user