commit
26ef7e5533
1 changed files with 4 additions and 2 deletions
|
@ -125,6 +125,8 @@ namespace ts {
|
|||
};
|
||||
|
||||
export let sys: System = (() => {
|
||||
const utf8ByteOrderMark = "\u00EF\u00BB\u00BF";
|
||||
|
||||
function getNodeSystem(): System {
|
||||
const _fs = require("fs");
|
||||
const _path = require("path");
|
||||
|
@ -348,7 +350,7 @@ namespace ts {
|
|||
function writeFile(fileName: string, data: string, writeByteOrderMark?: boolean): void {
|
||||
// If a BOM is required, emit one
|
||||
if (writeByteOrderMark) {
|
||||
data = "\uFEFF" + data;
|
||||
data = utf8ByteOrderMark + data;
|
||||
}
|
||||
|
||||
let fd: number;
|
||||
|
@ -549,7 +551,7 @@ namespace ts {
|
|||
writeFile(path: string, data: string, writeByteOrderMark?: boolean) {
|
||||
// If a BOM is required, emit one
|
||||
if (writeByteOrderMark) {
|
||||
data = "\uFEFF" + data;
|
||||
data = utf8ByteOrderMark + data;
|
||||
}
|
||||
|
||||
ChakraHost.writeFile(path, data);
|
||||
|
|
Loading…
Reference in a new issue