Skip to content

Commit 95c938d

Browse files
committed
fix warnings from api-extractor report
1 parent 9e88813 commit 95c938d

File tree

4 files changed

+8
-10
lines changed

4 files changed

+8
-10
lines changed

lib/getHashDigest.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { BinaryToTextEncoding } from "crypto";
22

3-
const baseEncodeTables = {
3+
export const baseEncodeTables = {
44
26: "abcdefghijklmnopqrstuvwxyz",
55
32: "123456789abcdefghjkmnpqrstuvwxyz", // no 0lio
66
36: "0123456789abcdefghijklmnopqrstuvwxyz",
@@ -11,14 +11,9 @@ const baseEncodeTables = {
1111
64: "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_",
1212
};
1313

14-
type BaseEncoding = keyof typeof baseEncodeTables;
15-
type DigestType = `base${BaseEncoding}`;
14+
export type BaseEncoding = keyof typeof baseEncodeTables;
15+
export type DigestType = `base${BaseEncoding}`;
1616

17-
/**
18-
* @param {Uint32Array} uint32Array Treated as a long base-0x100000000 number, little endian
19-
* @param {number} divisor The divisor
20-
* @return {number} Modulo (remainder) of the division
21-
*/
2217
function divmod32(uint32Array: Uint32Array, divisor: number): number {
2318
let carry = 0;
2419
for (let i = uint32Array.length - 1; i >= 0; i--) {

lib/hash/wasm-hash.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ export const create = (
206206
if (instancesPool.length > 0) {
207207
result = instancesPool.pop();
208208

209-
// old is possibly undefined
209+
// result is possibly undefined
210210
// protect reset call here
211211
result?.reset();
212212
}

lib/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@ export { default as isUrlRequest } from "./isUrlRequest";
22
export { default as urlToRequest } from "./urlToRequest";
33
export { default as getHashDigest } from "./getHashDigest";
44
export { default as interpolateName } from "./interpolateName";
5+
6+
export type { IInterpolateNameOptions } from "./interpolateName";
7+
export type { DigestType, BaseEncoding, baseEncodeTables } from "./getHashDigest";

lib/interpolateName.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { LoaderContext } from "webpack";
22
import path from "path";
33
import getHashDigest from "./getHashDigest";
44

5-
interface IInterpolateNameOptions {
5+
export interface IInterpolateNameOptions {
66
content?: Buffer;
77
context?: string;
88
regExp?: string;

0 commit comments

Comments
 (0)