@types/fast-text-encoding
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -1,7 +0,1 @@ | ||
// Type definitions for fast-text-encoding 1.0 | ||
// Project: https://github.com/samthor/fast-text-encoding#readme | ||
// Definitions by: Ciarán Ingle <https://github.com/inglec-arista> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
// TypeScript Version: 2.2 | ||
/** | ||
@@ -8,0 +2,0 @@ * fast-text-encoding does not export any members, but defines the global classes |
{ | ||
"name": "@types/fast-text-encoding", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "TypeScript definitions for fast-text-encoding", | ||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/fast-text-encoding", | ||
"license": "MIT", | ||
@@ -9,4 +10,4 @@ "contributors": [ | ||
"name": "Ciarán Ingle", | ||
"url": "https://github.com/inglec-arista", | ||
"githubUsername": "inglec-arista" | ||
"githubUsername": "inglec-arista", | ||
"url": "https://github.com/inglec-arista" | ||
} | ||
@@ -23,4 +24,4 @@ ], | ||
"dependencies": {}, | ||
"typesPublisherContentHash": "dc11dd80485c838325a3782a680b99b42c85e448b1fe0f8294cbd0c9abddc2fa", | ||
"typeScriptVersion": "2.8" | ||
"typesPublisherContentHash": "4d05df28d448616193d4b2def07714d038c7c46c7b0ac0d4fb75f4063b2aa60e", | ||
"typeScriptVersion": "4.5" | ||
} |
@@ -9,9 +9,72 @@ # Installation | ||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/fast-text-encoding. | ||
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/fast-text-encoding/index.d.ts) | ||
````ts | ||
/** | ||
* fast-text-encoding does not export any members, but defines the global classes | ||
* 1) TextDecoder (https://developer.mozilla.org/en-US/docs/Web/API/TextDecoder) | ||
* 2) TextEncoder (https://developer.mozilla.org/en-US/docs/Web/API/TextEncoder) | ||
* if they are not already defined. | ||
* | ||
* We do not declare these globals here since they are already declared in "lib.dom.d.ts" and would | ||
* result in name collisions. Instead, we export the types so that `TextDecoder` and `TextEncoder` | ||
* can be manually declared in a non-DOM environment (see tests). | ||
*/ | ||
declare namespace fastTextEncoding { | ||
/** | ||
* Options for `TextDecoder.decode` and `TextEncoder.encode`. | ||
*/ | ||
interface TextEncodingOptions { | ||
stream: boolean; | ||
} | ||
/** | ||
* Options for TextDecoder constructor. | ||
*/ | ||
interface TextDecoderOptions { | ||
fatal: boolean; | ||
} | ||
/** | ||
* TextDecoder instance. | ||
*/ | ||
class TextDecoderClass { | ||
encoding: string; | ||
fatal: boolean; | ||
ignoreBOM: boolean; | ||
constructor(utfLabel?: string, options?: TextDecoderOptions); | ||
decode(buffer: Uint8Array, options?: TextEncodingOptions): string; | ||
} | ||
/** | ||
* TextEncoder instance. | ||
*/ | ||
class TextEncoderClass { | ||
encoding: string; | ||
constructor(label?: string); | ||
encode(string: string, options?: TextEncodingOptions): Uint8Array; | ||
} | ||
/** | ||
* TextDecoder class. | ||
*/ | ||
type TextDecoder = typeof TextDecoderClass; | ||
/** | ||
* TextEncoder class. | ||
*/ | ||
type TextEncoder = typeof TextEncoderClass; | ||
} | ||
```` | ||
### Additional Details | ||
* Last updated: Tue, 26 Nov 2019 23:20:33 GMT | ||
* Last updated: Wed, 18 Oct 2023 01:17:34 GMT | ||
* Dependencies: none | ||
* Global values: `fastTextEncoding` | ||
# Credits | ||
These definitions were written by Ciarán Ingle (https://github.com/inglec-arista). | ||
These definitions were written by [Ciarán Ingle](https://github.com/inglec-arista). |
Sorry, the diff of this file is not supported yet
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
5797
0
80
50