Skip to content

Commit

Permalink
feat(transducers-binary): enable TS strict compiler flags (refactor)
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Jun 4, 2019
1 parent 2f8ec89 commit 8d86ac6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/transducers-binary/src/base64.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export function base64Encode(...args: any[]): any {
const opts = { safe: false, buffer: 1024, ...args[0] };
const chars = opts.safe ? B64_SAFE : B64_CHARS;
const buf: string[] = [];
return [
return <Reducer<any, number>>[
init,
(acc) => {
switch (state) {
Expand Down
14 changes: 7 additions & 7 deletions packages/transducers-binary/src/utf8.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ export function utf8Decode(src?: Iterable<number>): any {
? [...iterator1(utf8Decode(), src)].join("")
: (rfn: Reducer<any, string>) => {
const r = rfn[2];
let state = 0,
u0,
u1,
u2,
u3,
u4;
let state = 0;
let u0: number;
let u1: number;
let u2: number;
let u3: number;
let u4: number;
return compR(rfn, (acc, x: number) => {
switch (state) {
case 0:
Expand Down Expand Up @@ -187,7 +187,7 @@ export function utf8Encode(src?: string): any {
};
}

const codePoint = (x) =>
const codePoint = (x: number) =>
x < 0x10000
? String.fromCharCode(x)
: ((x -= 0x10000),
Expand Down

0 comments on commit 8d86ac6

Please sign in to comment.