Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@xylabs/promise

Package Overview
Dependencies
Maintainers
0
Versions
215
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xylabs/promise - npm Package Compare versions

Comparing version 4.0.3 to 4.0.4

dist/neutral/fulfilled.d.ts

52

dist/neutral/index.d.ts

@@ -1,44 +0,8 @@

declare const fulfilled: <T>(val: PromiseSettledResult<T>) => val is PromiseFulfilledResult<T>;
declare const fulfilledValues: <T>(previousValue: T[], currentValue: PromiseSettledResult<T>) => T[];
type TypedValue = bigint | string | number | boolean | null | TypedObject | TypedArray | Function | symbol | undefined;
type TypedKey<T extends string | void = void> = T extends string ? T : string | number | symbol;
type TypedObject = {
[key: TypedKey]: TypedValue;
} | object;
type TypedArray = TypedValue[];
declare const isTypedKey: (value: unknown) => value is TypedKey;
declare const isTypedValue: (value: unknown) => value is TypedValue;
declare const isTypedArray: (value: unknown) => value is TypedArray;
declare const isValidTypedFieldPair: (pair: [key: unknown, value: unknown]) => pair is [key: TypedKey, value: TypedValue];
declare const isTypedObject: (value: unknown) => value is TypedObject;
interface PromiseType {
then: () => unknown;
}
type AnyNonPromise = Exclude<TypedValue, Promise<unknown>>;
declare const isPromise: (value: unknown) => value is Promise<unknown>;
type PromiseExSubFunc<T, TResult = T> = (value: T) => TResult;
type PromiseExFunc<T> = (resolve?: PromiseExSubFunc<T, void>, reject?: PromiseExSubFunc<T, void>) => void;
type PromiseExValueFunc<V> = (value?: V) => boolean;
declare class PromiseEx<T, V = void> extends Promise<T> {
cancelled?: boolean;
private _value?;
constructor(func: PromiseExFunc<T>, value?: V);
then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: unknown) => TResult2 | PromiseLike<TResult2>) | null | undefined, onvalue?: (value?: V) => boolean): Promise<TResult1 | TResult2>;
value(onvalue?: (value?: V) => boolean): this;
}
declare const rejected: <T>(val: PromiseSettledResult<T>) => val is PromiseRejectedResult;
type Promisable<T, V = never> = PromiseEx<T, V> | Promise<T> | T;
type PromisableArray<T, V = never> = Promisable<T[], V>;
type OptionalPromisable<T, V = never> = Promisable<T | undefined, V>;
type OptionalPromisableArray<T, V = never> = PromisableArray<T | undefined, V>;
type NullablePromisable<T, V = never> = Promisable<T | null, V>;
type NullablePromisableArray<T, V = never> = PromisableArray<T | null, V>;
type AsyncMutex<T> = Promise<T>;
export { type AnyNonPromise, type AsyncMutex, type NullablePromisable, type NullablePromisableArray, type OptionalPromisable, type OptionalPromisableArray, type Promisable, type PromisableArray, PromiseEx, type PromiseExFunc, type PromiseExSubFunc, type PromiseExValueFunc, type PromiseType, type TypedArray, type TypedKey, type TypedObject, type TypedValue, fulfilled, fulfilledValues, isPromise, isTypedArray, isTypedKey, isTypedObject, isTypedValue, isValidTypedFieldPair, rejected };
export { fulfilled } from './fulfilled.ts';
export { fulfilledValues } from './fulfilledValues.ts';
export * from './isPromise.ts';
export * from './PromiseEx.ts';
export { rejected } from './rejected.ts';
export * from './Typed.ts';
export * from './types.ts';
//# sourceMappingURL=index.d.ts.map
{
"name": "@xylabs/promise",
"version": "4.0.3",
"version": "4.0.4",
"description": "Base functionality used throughout XY Labs TypeScript/JavaScript libraries",

@@ -39,5 +39,5 @@ "keywords": [

"devDependencies": {
"@xylabs/ts-scripts-yarn3": "^4.0.0",
"@xylabs/tsconfig": "^4.0.0",
"@xylabs/tsconfig-jest": "^4.0.0",
"@xylabs/ts-scripts-yarn3": "^4.0.7",
"@xylabs/tsconfig": "^4.0.7",
"@xylabs/tsconfig-jest": "^4.0.7",
"typescript": "^5.5.4"

@@ -44,0 +44,0 @@ },

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc