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:
parent
bbcdc9b488
commit
92e97bca41
3 changed files with 12 additions and 3 deletions
1
Makefile
1
Makefile
|
@ -8,6 +8,7 @@ TS_FILES = \
|
|||
msg.pb.js \
|
||||
os.ts \
|
||||
runtime.ts \
|
||||
text-encoding.d.ts \
|
||||
timers.ts \
|
||||
tsconfig.json \
|
||||
types.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
|
||||
|
|
13
text-encoding.d.ts
vendored
13
text-encoding.d.ts
vendored
|
@ -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" {
|
||||
|
|
Loading…
Reference in a new issue