@squared-functions/types
Advanced tools
Comparing version 4.9.4 to 4.9.5
@@ -19,7 +19,10 @@ import type { CompressFormat as ICompressFormat } from './squared'; | ||
type ResultCallback<T = Null<Buffer | Uint8Array>> = (err: unknown, data?: T, ext?: string) => void; | ||
type ResultData = Null<Buffer | Uint8Array> | string; | ||
export type BufferLike = Buffer | Uint8Array | ArrayBuffer | SharedArrayBuffer | ReadonlyArray<number>; | ||
export type TryFileCompressor = (buffer: BufferOfURI, output: string, config: CompressFormat, callback?: TryFileResult) => void; | ||
export type TryResultCallback<T = Null<Buffer | Uint8Array>> = (err: unknown, value?: T, ext?: string) => void; | ||
export type TryFileResult = TryResultCallback<Null<Buffer | Uint8Array> | string>; | ||
export type TryImageResult = TryResultCallback; | ||
export type TryFileCompressor = (data: string | Buffer, output: string, config: CompressFormat, callback?: TryFileResult) => Void<Promise<ResultData>>; | ||
export type TryFileCompressorAsync = (data: string | Buffer, output: string, config: CompressFormat) => Promise<ResultData>; | ||
export type TryFileResult = ResultCallback<ResultData>; | ||
export type TryImageResult = ResultCallback; | ||
export type BufferResult = Null<Buffer | Uint8Array>; |
@@ -42,2 +42,3 @@ /* eslint @typescript-eslint/no-explicit-any: "off" */ | ||
STORE_RESULT_PARTITION_SIZE: number; | ||
STORE_RESULT_PARTITION_MULT: number; | ||
readonly TRANSACTION_ACTIVE: number; | ||
@@ -44,0 +45,0 @@ readonly TRANSACTION_PARTIAL: number; |
@@ -436,2 +436,7 @@ /* eslint @typescript-eslint/no-explicit-any: "off" */ | ||
restart(recursive?: boolean | "abort", exclusions?: string[], emptyDir?: boolean): void; | ||
finalizeCompress(assets: T[]): Promise<unknown>; | ||
finalizeDocument(): Promise<unknown>; | ||
finalizeTask(assets: (T & Required<TaskAction>)[]): Promise<unknown>; | ||
finalizeCloud(): Promise<unknown>; | ||
finalizeCleanup(): Promise<unknown>; | ||
finalize(): Promise<void>; | ||
@@ -438,0 +443,0 @@ close(): void; |
@@ -276,3 +276,3 @@ import type { PermissionAction, PermissionSettings, PermittedDirectories } from './core'; | ||
export type TaskModule = ClientModule<StringMap>; | ||
export interface TaskModule<T = PlainObject> extends ClientModule<T>, AnyObject {} | ||
@@ -279,0 +279,0 @@ export interface CloudModule<T = CloudSettings> extends ClientModule<T>, CloudServiceDataType<ObjectMap<AnyObject>> { |
@@ -136,5 +136,5 @@ /// <reference path="type.d.ts" /> | ||
export interface TaskCommand { | ||
export interface TaskCommand<T = PlainObject> { | ||
handler?: string; | ||
task?: string; | ||
task?: string | T; | ||
preceding?: boolean; | ||
@@ -141,0 +141,0 @@ } |
{ | ||
"name": "@squared-functions/types", | ||
"version": "4.9.4", | ||
"version": "4.9.5", | ||
"description": "Type definitions for squared-functions.", | ||
@@ -17,3 +17,3 @@ "types": "index.d.ts", | ||
"author": "An Pham <anpham6@gmail.com>", | ||
"license": "MIT", | ||
"license": "Apache 2.0", | ||
"homepage": "https://github.com/anpham6/squared-functions#readme", | ||
@@ -20,0 +20,0 @@ "dependencies": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3973
173641
27