Added merge_module function. Added text module (currently having encoding only). Updated the FileSystem File object with readText, writeText methods (removed the FileReader, FileWriter classes).

This commit is contained in:
atanasovg
2014-04-29 11:52:45 +03:00
parent bf9b564bf5
commit 162dbe56c9
14 changed files with 189 additions and 134 deletions

2
text/index.ts Normal file
View File

@@ -0,0 +1,2 @@
declare var module, require;
module.exports = require("text/text");

8
text/text.android.ts Normal file
View File

@@ -0,0 +1,8 @@
export module encoding {
export var ISO_8859_1 = "ISO-8859-1";
export var US_ASCII = "US-ASCII";
export var UTF_16 = "UTF-16";
export var UTF_16BE = "UTF-16BE";
export var UTF_16LE = "UTF-16LE";
export var UTF_8 = "UTF-8";
}

11
text/text.d.ts vendored Normal file
View File

@@ -0,0 +1,11 @@
/**
* Defines the supported character encodings.
*/
export declare module encoding {
export var ISO_8859_1: any;
export var US_ASCII: any;
export var UTF_16: any;
export var UTF_16BE: any;
export var UTF_16LE: any;
export var UTF_8: any;
}

8
text/text.ios.ts Normal file
View File

@@ -0,0 +1,8 @@
export module encoding {
export var ISO_8859_1 = 5; //NSISOLatin1StringEncoding
export var US_ASCII = 1; //NSASCIIStringEncoding
export var UTF_16 = 10; //NSUnicodeStringEncoding
export var UTF_16BE = 0x90000100; //NSUTF16BigEndianStringEncoding
export var UTF_16LE = 0x94000100; //NSUTF16LittleEndianStringEncoding
export var UTF_8 = 4; //NSUTF8StringEncoding
}