summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2018-05-27 14:15:22 -0400
committerRyan Dahl <ry@tinyclouds.org>2018-05-27 14:20:23 -0400
commit92e97bca41266df17a5c305e1633c3060e23d26f (patch)
treee21f3e866cb8df84cc60778b096106cb38b5e947
parentbbcdc9b488b0674bb424b3eb58a8586c4d73f9bd (diff)
workaround text-encoding bug
-rw-r--r--Makefile1
-rw-r--r--globals.ts1
-rw-r--r--text-encoding.d.ts13
3 files changed, 12 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 0e9e3a5f7..e7103039e 100644
--- a/Makefile
+++ b/Makefile
@@ -8,6 +8,7 @@ TS_FILES = \
msg.pb.js \
os.ts \
runtime.ts \
+ text-encoding.d.ts \
timers.ts \
tsconfig.json \
types.ts \
diff --git a/globals.ts b/globals.ts
index 184f25163..e82afd75b 100644
--- a/globals.ts
+++ b/globals.ts
@@ -1,3 +1,4 @@
+/// <reference path="./text-encoding.d.ts" />
import * as timer from "./timers";
// If you use the eval function indirectly, by invoking it via a reference
diff --git a/text-encoding.d.ts b/text-encoding.d.ts
index d86ee007f..b2ec9bc8f 100644
--- a/text-encoding.d.ts
+++ b/text-encoding.d.ts
@@ -1,3 +1,4 @@
+
// Type definitions for text-encoding
// Project: https://github.com/inexorabletash/text-encoding
// Definitions by: MIZUNE Pine <https://github.com/pine613>
@@ -49,10 +50,16 @@ declare namespace TextEncoding {
}
}
-declare var TextDecoder: TextEncoding.TextDecoderStatic;
-
-declare var TextEncoder: TextEncoding.TextEncoderStatic;
+/* Removed following lines to workaround this bug:
+ text-encoding.d.ts:52:13 - error TS2403: Subsequent variable declarations
+ must have the same type. Variable 'TextDecoder' must be of type '{ new
+ (label?: string, options?: TextDecoderOptions): TextDecoder; prototype:
+ TextDecoder; }', but here has type 'TextDecoderStatic'.
+ 52 declare var TextDecoder: TextEncoding.TextDecoderStatic;
+ */
+// declare var TextDecoder: TextEncoding.TextDecoderStatic;
+// declare var TextEncoder: TextEncoding.TextEncoderStatic;
declare var TextEncoding: TextEncoding.TextEncodingStatic;
declare module "text-encoding" {