@alwatr/flatomise 1.0.2 → 1.1.0
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/CHANGELOG.md +6 -0
- package/dist/main.cjs +2 -2
- package/dist/main.cjs.map +2 -2
- package/dist/main.d.ts +5 -5
- package/dist/main.d.ts.map +1 -1
- package/dist/main.mjs +2 -2
- package/dist/main.mjs.map +2 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [1.1.0](https://github.com/Alwatr/nanolib/compare/@alwatr/flatomise@1.0.2...@alwatr/flatomise@1.1.0) (2024-01-08)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **flatomise:** generic type ([3193b43](https://github.com/Alwatr/nanolib/commit/3193b4378681ec7c840d6d7806dad041a1db7573)) by @AliMD
|
|
11
|
+
|
|
6
12
|
## [1.0.2](https://github.com/Alwatr/nanolib/compare/@alwatr/flatomise@1.0.1...@alwatr/flatomise@1.0.2) (2024-01-08)
|
|
7
13
|
|
|
8
14
|
**Note:** Version bump only for package @alwatr/flatomise
|
package/dist/main.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @alwatr/flatomise v1.0
|
|
2
|
-
"use strict";var
|
|
1
|
+
/* @alwatr/flatomise v1.1.0 */
|
|
2
|
+
"use strict";var s=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var n=(e,o)=>{for(var i in o)s(e,i,{get:o[i],enumerable:!0})},T=(e,o,i,t)=>{if(o&&typeof o=="object"||typeof o=="function")for(let r of m(o))!l.call(e,r)&&r!==i&&s(e,r,{get:()=>o[r],enumerable:!(t=a(o,r))||t.enumerable});return e};var c=e=>T(s({},"__esModule",{value:!0}),e);var F={};n(F,{newFlatomise:()=>v});module.exports=c(F);function v(){let e={};return e.promise=new Promise((o,i)=>{e.resolve=o,e.reject=i}),e}0&&(module.exports={newFlatomise});
|
|
3
3
|
//# sourceMappingURL=main.cjs.map
|
package/dist/main.cjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/main.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Flat promise that can be resolved or rejected from outside.\n */\nexport interface Flatomise {\n promise: Promise<
|
|
5
|
-
"mappings": ";yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,kBAAAE,IAAA,eAAAC,EAAAH,
|
|
4
|
+
"sourcesContent": ["/**\n * Flat promise that can be resolved or rejected from outside.\n */\nexport interface Flatomise<T> {\n promise: Promise<T>;\n resolve: (value: T | PromiseLike<T>) => void;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n reject: (reason?: any) => void;\n}\n\n/**\n * Create a new Flatomise is a promise that can be resolved or rejected from outside.\n *\n * @returns A new Flatomise.\n *\n * @example\n * ```typescript\n * const flatomise = newFlatomise();\n * flatomise.promise.then(() => {\n * console.log('flatomise resolved');\n * });\n * flatomise.resolve();\n * ```\n */\nexport function newFlatomise<T>(): Flatomise<T> {\n const flatomise: Partial<Flatomise<T>> = {};\n flatomise.promise = new Promise<T>((resolve, reject) => {\n flatomise.resolve = resolve;\n flatomise.reject = reject;\n });\n return flatomise as Flatomise<T>;\n}\n"],
|
|
5
|
+
"mappings": ";yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,kBAAAE,IAAA,eAAAC,EAAAH,GAwBO,SAASE,GAAgC,CAC9C,IAAME,EAAmC,CAAC,EAC1C,OAAAA,EAAU,QAAU,IAAI,QAAW,CAACC,EAASC,IAAW,CACtDF,EAAU,QAAUC,EACpBD,EAAU,OAASE,CACrB,CAAC,EACMF,CACT",
|
|
6
6
|
"names": ["main_exports", "__export", "newFlatomise", "__toCommonJS", "flatomise", "resolve", "reject"]
|
|
7
7
|
}
|
package/dist/main.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Flat promise that can be resolved or rejected from outside.
|
|
3
3
|
*/
|
|
4
|
-
export interface Flatomise {
|
|
5
|
-
promise: Promise<
|
|
6
|
-
resolve: () => void;
|
|
7
|
-
reject: () => void;
|
|
4
|
+
export interface Flatomise<T> {
|
|
5
|
+
promise: Promise<T>;
|
|
6
|
+
resolve: (value: T | PromiseLike<T>) => void;
|
|
7
|
+
reject: (reason?: any) => void;
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
10
|
* Create a new Flatomise is a promise that can be resolved or rejected from outside.
|
|
@@ -20,5 +20,5 @@ export interface Flatomise {
|
|
|
20
20
|
* flatomise.resolve();
|
|
21
21
|
* ```
|
|
22
22
|
*/
|
|
23
|
-
export declare function newFlatomise(): Flatomise
|
|
23
|
+
export declare function newFlatomise<T>(): Flatomise<T>;
|
|
24
24
|
//# sourceMappingURL=main.d.ts.map
|
package/dist/main.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,SAAS;
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,SAAS,CAAC,CAAC;IAC1B,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IACpB,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IAE7C,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;CAChC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,YAAY,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,CAO9C"}
|
package/dist/main.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @alwatr/flatomise v1.0
|
|
2
|
-
function
|
|
1
|
+
/* @alwatr/flatomise v1.1.0 */
|
|
2
|
+
function r(){let e={};return e.promise=new Promise((o,i)=>{e.resolve=o,e.reject=i}),e}export{r as newFlatomise};
|
|
3
3
|
//# sourceMappingURL=main.mjs.map
|
package/dist/main.mjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/main.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Flat promise that can be resolved or rejected from outside.\n */\nexport interface Flatomise {\n promise: Promise<
|
|
5
|
-
"mappings": ";
|
|
4
|
+
"sourcesContent": ["/**\n * Flat promise that can be resolved or rejected from outside.\n */\nexport interface Flatomise<T> {\n promise: Promise<T>;\n resolve: (value: T | PromiseLike<T>) => void;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n reject: (reason?: any) => void;\n}\n\n/**\n * Create a new Flatomise is a promise that can be resolved or rejected from outside.\n *\n * @returns A new Flatomise.\n *\n * @example\n * ```typescript\n * const flatomise = newFlatomise();\n * flatomise.promise.then(() => {\n * console.log('flatomise resolved');\n * });\n * flatomise.resolve();\n * ```\n */\nexport function newFlatomise<T>(): Flatomise<T> {\n const flatomise: Partial<Flatomise<T>> = {};\n flatomise.promise = new Promise<T>((resolve, reject) => {\n flatomise.resolve = resolve;\n flatomise.reject = reject;\n });\n return flatomise as Flatomise<T>;\n}\n"],
|
|
5
|
+
"mappings": ";AAwBO,SAASA,GAAgC,CAC9C,IAAMC,EAAmC,CAAC,EAC1C,OAAAA,EAAU,QAAU,IAAI,QAAW,CAACC,EAASC,IAAW,CACtDF,EAAU,QAAUC,EACpBD,EAAU,OAASE,CACrB,CAAC,EACMF,CACT",
|
|
6
6
|
"names": ["newFlatomise", "flatomise", "resolve", "reject"]
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alwatr/flatomise",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "A utility for creating promises that can be externally resolved or rejected.",
|
|
5
5
|
"author": "S. Ali Mihandoost <ali.mihandoost@gmail.com>",
|
|
6
6
|
"keywords": [
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"@types/node": "^20.10.7",
|
|
72
72
|
"typescript": "^5.3.3"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "ef1fb8f170f5eed1449b56d99decdf8397844c9d"
|
|
75
75
|
}
|