
Product
Socket Now Available on Google Cloud Marketplace
Socket, the leader in open source security, is now available on Google Cloud Marketplace for simplified procurement and enhanced protection against supply chain attacks.
@types/fast-text-encoding
Advanced tools
TypeScript definitions for fast-text-encoding
npm install --save @types/fast-text-encoding
This package contains type definitions for fast-text-encoding (https://github.com/samthor/fast-text-encoding#readme).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/fast-text-encoding.
/**
* 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;
}
These definitions were written by Ciarán Ingle.
FAQs
TypeScript definitions for fast-text-encoding
The npm package @types/fast-text-encoding receives a total of 11,108 weekly downloads. As such, @types/fast-text-encoding popularity was classified as popular.
We found that @types/fast-text-encoding demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket, the leader in open source security, is now available on Google Cloud Marketplace for simplified procurement and enhanced protection against supply chain attacks.
Security News
Corepack will be phased out from future Node.js releases following a TSC vote.
Research
Security News
Research uncovers Black Basta's plans to exploit package registries for ransomware delivery alongside evidence of similar attacks already targeting open source ecosystems.