1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-24 15:19:26 -05:00

workaround text-encoding bug

This commit is contained in:
Ryan Dahl 2018-05-27 14:15:22 -04:00
parent bbcdc9b488
commit 92e97bca41
3 changed files with 12 additions and 3 deletions

View file

@ -8,6 +8,7 @@ TS_FILES = \
msg.pb.js \
os.ts \
runtime.ts \
text-encoding.d.ts \
timers.ts \
tsconfig.json \
types.ts \

View file

@ -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

13
text-encoding.d.ts vendored
View file

@ -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" {