@e-mc/types 0.9.11 → 0.9.12

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.11/index.d.ts)
12
+ * [View Source](https://www.unpkg.com/@e-mc/types@0.9.12/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.11/lib/logger.d.ts
198
- - https://www.unpkg.com/@e-mc/types@0.9.11/lib/module.d.ts
197
+ - https://www.unpkg.com/@e-mc/types@0.9.12/lib/logger.d.ts
198
+ - https://www.unpkg.com/@e-mc/types@0.9.12/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.11',
2
+ VERSION = '0.9.12',
3
3
  TEMP_DIR = 'tmp',
4
4
  CJS = '__cjs__'
5
5
  }
package/index.d.ts CHANGED
@@ -288,7 +288,7 @@ declare namespace types {
288
288
  function isPlainObject<T = PlainObject>(value: unknown): value is T;
289
289
  function isString(value: unknown): value is string;
290
290
  function isEmpty(value: unknown): boolean;
291
- function asFunction<U = unknown, V = unknown>(value: unknown, sync?: boolean): Null<FunctionType<Promise<U> | U, V>>;
291
+ function asFunction<U = unknown, V = unknown>(value: unknown, sync?: boolean): Null<FunctionType<U, V>>;
292
292
  function parseTime(value: NumString, start?: number): number;
293
293
  function parseExpires(value: NumString, start?: number): number;
294
294
  function formatTime(value: number, char: string): string;
package/lib/dom.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ interface EventListenerOptions {
2
+ capture?: boolean;
3
+ }
4
+
5
+ export interface AddEventListenerOptions extends EventListenerOptions {
6
+ once?: boolean;
7
+ passive?: boolean;
8
+ signal?: AbortSignal;
9
+ }
package/lib/index.d.ts CHANGED
@@ -15,7 +15,7 @@ import type { AssetContentOptions, ChecksumOptions, DeleteFileAddendum, FileOutp
15
15
  import type { HttpAgentSettings, HttpProtocolVersion, HttpRequestClient, InternetProtocolVersion } from './http';
16
16
  import type { CommandData, CropData, QualityData, ResizeData, RotateData, TransformOptions } from './image';
17
17
  import type { ExecCommand, LOG_TYPE, LogArguments, LogComponent, LogDate, LogFailOptions, LogMessageOptions, LogOptions, LogProcessOptions, LogState, LogTime, LogType, LogValue, STATUS_TYPE, StatusType } from './logger';
18
- import type { AsHashOptions, CheckSemVerOptions, CopyDirOptions, CopyDirResult, CopyFileOptions, CreateDirOptions, DeleteFileOptions, GetTempDirOptions, MoveFileOptions, NormalizeFlags, ParseFunctionOptions, PermissionOptions, ProtocolType, ReadBufferOptions, ReadFileCallback, ReadFileOptions, ReadHashOptions, ReadTextOptions, RemoveDirOptions, WriteFileOptions } from './module';
18
+ import type { AsHashOptions, CheckSemVerOptions, CopyDirOptions, CopyDirResult, CopyFileOptions, CreateDirOptions, DeleteFileOptions, GetTempDirOptions, GlobDirOptions, MoveFileOptions, NormalizeFlags, ParseFunctionOptions, PermissionOptions, ProtocolType, ReadBufferOptions, ReadFileCallback, ReadFileOptions, ReadHashOptions, ReadTextOptions, RemoveDirOptions, WriteFileOptions } from './module';
19
19
  import type { RequestData, Settings } from './node';
20
20
  import type { ApplyOptions, Aria2Options, BufferFormat, DataEncodedResult, DataObjectResult, FormDataPart, HeadersOnCallback, HostConfig, OpenOptions, PostOptions, ProxySettings, ReadExpectType, RequestInit, StatusOnCallback } from './request';
21
21
  import type { ClientModule, CloudAuthSettings, CloudModule, CloudServiceOptions, CompressModule, CompressSettings, DbCoerceSettings, DbModule, DbSourceOptions, DnsLookupSettings, DocumentComponent, DocumentComponentOption, DocumentModule, HandlerSettings, HttpConnectSettings, HttpMemorySettings, ImageModule, LoggerFormat, LoggerFormatSettings, PoolConfig, RequestModule, RequestSettings, TaskModule, WatchModule } from './settings';
@@ -746,6 +746,8 @@ declare namespace functions {
746
746
  removeDir(value: string | URL, empty?: boolean, recursive?: boolean): boolean;
747
747
  copyDir(src: string | URL, dest: string | URL, move?: boolean, recursive?: boolean): Promise<CopyDirResult>;
748
748
  copyDir(src: string | URL, dest: string | URL, options?: CopyDirOptions): Promise<CopyDirResult>;
749
+ globDir(src: string | URL, pattern: ArrayOf<string>, recursive: boolean | number): Promise<string[]>;
750
+ globDir(src: string | URL, pattern: ArrayOf<string>, options?: GlobDirOptions): Promise<string[]>;
749
751
  renameFile(src: string | URL, dest: string | URL, throws?: boolean): boolean;
750
752
  streamFile<U extends Bufferable>(value: string | URL, cache: boolean): Promise<U>;
751
753
  streamFile<U extends ReadBufferOptions>(value: string | URL, options: U): Promise<U extends { encoding: string } ? string : Buffer>;
package/lib/module.d.ts CHANGED
@@ -101,6 +101,14 @@ export interface CopyDirResult {
101
101
  ignored: string[];
102
102
  }
103
103
 
104
+ export interface GlobDirOptions {
105
+ exclude?: ArrayOf<string>;
106
+ recursive?: boolean | number;
107
+ matchBase?: boolean;
108
+ dot?: boolean;
109
+ contains?: boolean;
110
+ }
111
+
104
112
  export interface StreamBase extends StreamAction {
105
113
  signal?: AbortSignal;
106
114
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e-mc/types",
3
- "version": "0.9.11",
3
+ "version": "0.9.12",
4
4
  "description": "Type definitions for E-mc.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",