@forklaunch/common 0.1.0 → 0.1.1
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/dist/index.d.ts +2 -0
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -0
- package/dist/types/flatten.types.d.ts +16 -0
- package/dist/types/flatten.types.js +3 -0
- package/dist/types/flatten.types.js.map +1 -0
- package/dist/types/prettify.types.d.ts +12 -0
- package/dist/types/prettify.types.js +3 -0
- package/dist/types/prettify.types.js.map +1 -0
- package/package.json +2 -1
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./types/flatten.types"), exports);
|
|
18
|
+
__exportStar(require("./types/prettify.types"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,yDAAuC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A type that represents the values of an object type `T`.
|
|
3
|
+
*
|
|
4
|
+
* This utility type takes an object type `T` and produces a union of its value types.
|
|
5
|
+
*
|
|
6
|
+
* @template T - The object type to extract values from.
|
|
7
|
+
*/
|
|
8
|
+
export type FlattenValues<T> = T[keyof T];
|
|
9
|
+
/**
|
|
10
|
+
* A type that represents the keys of an object type `T`.
|
|
11
|
+
*
|
|
12
|
+
* This utility type takes an object type `T` and produces a union of its key types.
|
|
13
|
+
*
|
|
14
|
+
* @template T - The object type to extract keys from.
|
|
15
|
+
*/
|
|
16
|
+
export type FlattenKeys<T> = keyof T;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flatten.types.js","sourceRoot":"","sources":["../../types/flatten.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A type that "prettifies" the structure of an object type `T`.
|
|
3
|
+
*
|
|
4
|
+
* This utility type takes an object type `T` and re-maps its keys and values, effectively creating
|
|
5
|
+
* a new type with the same keys and values but without any extra type information or attributes.
|
|
6
|
+
* This can be useful for simplifying the displayed type information in development tools.
|
|
7
|
+
*
|
|
8
|
+
* @template T - The object type to prettify.
|
|
9
|
+
*/
|
|
10
|
+
export type Prettify<T> = {
|
|
11
|
+
[K in keyof T]: T[K];
|
|
12
|
+
} & {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prettify.types.js","sourceRoot":"","sources":["../../types/prettify.types.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forklaunch/common",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Common package for base types, interfaces, implementations.",
|
|
5
5
|
"files": ["dist/**"],
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
6
7
|
"scripts": {
|
|
7
8
|
"test": "jest",
|
|
8
9
|
"build": "tsc",
|