diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2019-04-21 16:40:10 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-21 16:40:10 -0400 |
commit | 9dfebbc9496138efbeedc431068f41662c780f3e (patch) | |
tree | c3718c3dc132d11c08c8fc18933daebf886bf787 /js/text_encoding.ts | |
parent | 6cded14bdf313762956d4d5361cfe8115628b535 (diff) |
Fix eslint warnings (#2151)
Co-authored-by: Bartek IwaĆczuk <biwanczuk@gmail.com>
Co-authored-by: LE GOFF Vincent <g_n_s@hotmail.fr>
Diffstat (limited to 'js/text_encoding.ts')
-rw-r--r-- | js/text_encoding.ts | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/js/text_encoding.ts b/js/text_encoding.ts index a1f9d6bff..883451631 100644 --- a/js/text_encoding.ts +++ b/js/text_encoding.ts @@ -289,18 +289,24 @@ for (const key of Object.keys(encodingMap)) { // A map of functions that return new instances of a decoder indexed by the // encoding type. const decoders = new Map<string, (options: DecoderOptions) => Decoder>(); -decoders.set("utf-8", (options: DecoderOptions) => { - return new UTF8Decoder(options); -}); +decoders.set( + "utf-8", + (options: DecoderOptions): UTF8Decoder => { + return new UTF8Decoder(options); + } +); // Single byte decoders are an array of code point lookups const encodingIndexes = new Map<string, number[]>(); // prettier-ignore encodingIndexes.set("windows-1252", [8364,129,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,141,381,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,157,382,376,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255]); for (const [key, index] of encodingIndexes) { - decoders.set(key, (options: DecoderOptions) => { - return new SingleByteDecoder(index, options); - }); + decoders.set( + key, + (options: DecoderOptions): SingleByteDecoder => { + return new SingleByteDecoder(index, options); + } + ); } function codePointsToString(codePoints: number[]): string { |