@e-mc/types 0.9.4 → 0.9.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -9,7 +9,7 @@
9
9
 
10
10
  ## Interface
11
11
 
12
- * [View Source](https://www.unpkg.com/@e-mc/types@0.9.4/index.d.ts)
12
+ * [View Source](https://www.unpkg.com/@e-mc/types@0.9.5/index.d.ts)
13
13
 
14
14
  ```typescript
15
15
  import type { LogArguments } from "./lib/logger";
@@ -194,8 +194,8 @@ const IMPORT_MAP: Record<string, string | undefined>;
194
194
 
195
195
  ## References
196
196
 
197
- - https://www.unpkg.com/@e-mc/types@0.9.4/lib/logger.d.ts
198
- - https://www.unpkg.com/@e-mc/types@0.9.4/lib/module.d.ts
197
+ - https://www.unpkg.com/@e-mc/types@0.9.5/lib/logger.d.ts
198
+ - https://www.unpkg.com/@e-mc/types@0.9.5/lib/module.d.ts
199
199
 
200
200
  * https://nodejs.org/api/perf_hooks.html
201
201
  * https://www.npmjs.com/package/@types/bytes
package/constant.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export const enum INTERNAL {
2
- VERSION = '0.9.4',
2
+ VERSION = '0.9.5',
3
3
  TEMP_DIR = 'tmp',
4
4
  CJS = '__cjs__'
5
5
  }
package/lib/compress.d.ts CHANGED
@@ -2,7 +2,10 @@ import type { CompressFormat as ICompressFormat } from './squared';
2
2
 
3
3
  import type { LogBaseOptions, LogTime } from './logger';
4
4
 
5
- interface CompressFormat extends ICompressFormat, LogBaseOptions {
5
+ type ResultCallback<T = Null<Buffer | Uint8Array>> = (err: unknown, data?: T, ext?: string) => void;
6
+ type ResultData = Null<Buffer | Uint8Array> | string;
7
+
8
+ export interface CompressFormat extends ICompressFormat, LogBaseOptions {
6
9
  filename?: string;
7
10
  startTime?: LogTime;
8
11
  etag?: string;
@@ -11,14 +14,11 @@ interface CompressFormat extends ICompressFormat, LogBaseOptions {
11
14
  outFile?: string;
12
15
  }
13
16
 
14
- interface Woff {
17
+ export interface Woff {
15
18
  toWoff(this: void, data: BufferLike): Buffer;
16
19
  toSfnt(this: void, data: BufferLike): Buffer;
17
20
  }
18
21
 
19
- type ResultCallback<T = Null<Buffer | Uint8Array>> = (err: unknown, data?: T, ext?: string) => void;
20
- type ResultData = Null<Buffer | Uint8Array> | string;
21
-
22
22
  export type BufferLike = Buffer | Uint8Array | ArrayBuffer | SharedArrayBuffer | readonly number[];
23
23
  export type TryFileCompressor = (data: string | Buffer, output: string, config: CompressFormat, callback?: ResultCallback<ResultData>) => Void<Promise<ResultData>>;
24
24
  export type TryFileCompressorAsync = (data: string | Buffer, output: string, config: CompressFormat) => Promise<ResultData>;
package/lib/index.d.ts CHANGED
@@ -106,7 +106,7 @@ declare namespace functions {
106
106
 
107
107
  interface ImageConstructor<T extends IHost = IHost, U extends ImageModule = ImageModule> extends ModuleConstructor {
108
108
  readonly REGEXP_SIZERANGE: RegExp;
109
- transform<V extends TransformOptions>(file: string, command: string, options?: V): Promise<U extends { tempFile: true } ? string : Null<Buffer>>;
109
+ transform<V extends TransformOptions>(file: string, command: string, options?: V): Promise<V extends { tempFile: true } ? string : Null<Buffer>>;
110
110
  clamp(value: unknown, min?: number, max?: number): number;
111
111
  isBinary(mime: unknown): mime is string;
112
112
  toABGR(buffer: Uint8Array | Buffer): Buffer;
package/lib/module.d.ts CHANGED
@@ -138,4 +138,4 @@ export interface IncludeAction<T = string[]> {
138
138
  export type NormalizeFlags = typeof NORMALIZE_FLAGS[keyof typeof NORMALIZE_FLAGS];
139
139
  export type ReadTextOptions = ReadBufferOptions;
140
140
  export type ReadFileCallback<T extends Bufferable = Bufferable> = (err: Null<NodeJS.ErrnoException>, data?: T) => void;
141
- export type ProtocolType = "http" | "https" | "http/s" | "ftp" | "sftp" | "s/ftp" | "torrent" | "unc";
141
+ export type ProtocolType = "http" | "https" | "http/s" | "ftp" | "sftp" | "s/ftp" | "torrent" | "unc" | "file";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e-mc/types",
3
- "version": "0.9.4",
3
+ "version": "0.9.5",
4
4
  "description": "Type definitions for E-mc.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",