mirror of
https://github.com/denoland/deno.git
synced 2024-11-28 16:20:57 -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 \
|
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 \
|
||||||
|
|
|
@ -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
13
text-encoding.d.ts
vendored
|
@ -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" {
|
||||||
|
|
Loading…
Reference in a new issue