mirror of
https://github.com/denoland/deno.git
synced 2024-12-22 07:14:47 -05:00
Move text-encoding types into repo so i can hack it.
It is unchanged in this commit.
This commit is contained in:
parent
9b8dc66c9f
commit
bbcdc9b488
3 changed files with 60 additions and 5 deletions
|
@ -8,7 +8,6 @@
|
|||
"devDependencies": {
|
||||
"@types/base64-js": "^1.2.5",
|
||||
"@types/source-map-support": "^0.4.0",
|
||||
"@types/text-encoding": "^0.0.32",
|
||||
"babel-polyfill": "^6.26.0",
|
||||
"base64-js": "^1.3.0",
|
||||
"espree": "^3.5.3",
|
||||
|
|
60
text-encoding.d.ts
vendored
Normal file
60
text-encoding.d.ts
vendored
Normal file
|
@ -0,0 +1,60 @@
|
|||
// Type definitions for text-encoding
|
||||
// Project: https://github.com/inexorabletash/text-encoding
|
||||
// Definitions by: MIZUNE Pine <https://github.com/pine613>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare namespace TextEncoding {
|
||||
interface TextDecoderOptions {
|
||||
fatal?: boolean;
|
||||
ignoreBOM?: boolean;
|
||||
}
|
||||
|
||||
interface TextDecodeOptions {
|
||||
stream?: boolean;
|
||||
}
|
||||
|
||||
interface TextEncoderOptions {
|
||||
NONSTANDARD_allowLegacyEncoding?: boolean;
|
||||
}
|
||||
|
||||
interface TextDecoder {
|
||||
encoding: string;
|
||||
fatal: boolean;
|
||||
ignoreBOM: boolean;
|
||||
decode(input?: ArrayBuffer | ArrayBufferView, options?: TextDecodeOptions): string;
|
||||
}
|
||||
|
||||
interface TextEncoder {
|
||||
encoding: string;
|
||||
encode(input?: string, options?: TextEncodeOptions): Uint8Array;
|
||||
}
|
||||
|
||||
interface TextEncodeOptions {
|
||||
stream?: boolean;
|
||||
}
|
||||
|
||||
interface TextEncoderStatic {
|
||||
(utfLabel?: string, options?: TextEncoderOptions): TextEncoder;
|
||||
new (utfLabel?: string, options?: TextEncoderOptions): TextEncoder;
|
||||
}
|
||||
|
||||
interface TextDecoderStatic {
|
||||
(label?: string, options?: TextDecoderOptions): TextDecoder;
|
||||
new (label?: string, options?: TextDecoderOptions): TextDecoder;
|
||||
}
|
||||
|
||||
interface TextEncodingStatic {
|
||||
TextEncoder: TextEncoderStatic;
|
||||
TextDecoder: TextDecoderStatic;
|
||||
}
|
||||
}
|
||||
|
||||
declare var TextDecoder: TextEncoding.TextDecoderStatic;
|
||||
|
||||
declare var TextEncoder: TextEncoding.TextEncoderStatic;
|
||||
|
||||
declare var TextEncoding: TextEncoding.TextEncodingStatic;
|
||||
|
||||
declare module "text-encoding" {
|
||||
export = TextEncoding;
|
||||
}
|
|
@ -67,10 +67,6 @@
|
|||
dependencies:
|
||||
"@types/node" "*"
|
||||
|
||||
"@types/text-encoding@^0.0.32":
|
||||
version "0.0.32"
|
||||
resolved "https://registry.yarnpkg.com/@types/text-encoding/-/text-encoding-0.0.32.tgz#52289b320a406850b14f08f48b475ca021218048"
|
||||
|
||||
abbrev@1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8"
|
||||
|
|
Loading…
Reference in a new issue