1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-30 16:40:57 -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 \ msg.pb.js \
os.ts \ os.ts \
runtime.ts \ runtime.ts \
text-encoding.d.ts \
timers.ts \ timers.ts \
tsconfig.json \ tsconfig.json \
types.ts \ types.ts \

View file

@ -1,3 +1,4 @@
/// <reference path="./text-encoding.d.ts" />
import * as timer from "./timers"; import * as timer from "./timers";
// If you use the eval function indirectly, by invoking it via a reference // 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 // Type definitions for text-encoding
// Project: https://github.com/inexorabletash/text-encoding // Project: https://github.com/inexorabletash/text-encoding
// Definitions by: MIZUNE Pine <https://github.com/pine613> // Definitions by: MIZUNE Pine <https://github.com/pine613>
@ -49,10 +50,16 @@ declare namespace TextEncoding {
} }
} }
declare var TextDecoder: TextEncoding.TextDecoderStatic; /* Removed following lines to workaround this bug:
text-encoding.d.ts:52:13 - error TS2403: Subsequent variable declarations
declare var TextEncoder: TextEncoding.TextEncoderStatic; 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 var TextEncoding: TextEncoding.TextEncodingStatic;
declare module "text-encoding" { declare module "text-encoding" {