mirror of
https://github.com/Start9Labs/start-sdk.git
synced 2026-03-31 04:33:40 +00:00
chore: Update
This commit is contained in:
@@ -6,9 +6,7 @@ export { PropertyObject } from "./PropertyObject";
|
|||||||
export { PropertyString } from "./PropertyString";
|
export { PropertyString } from "./PropertyString";
|
||||||
|
|
||||||
export const test = "";
|
export const test = "";
|
||||||
export type UnionToIntersection<T> = ((x: T) => any) extends (x: infer R) => any
|
export type UnionToIntersection<T> = ((x: T) => any) extends (x: infer R) => any ? R : never;
|
||||||
? R
|
|
||||||
: never;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is used during creating the type of properties fn in the service package.
|
* This is used during creating the type of properties fn in the service package.
|
||||||
@@ -20,8 +18,12 @@ export type UnionToIntersection<T> = ((x: T) => any) extends (x: infer R) => any
|
|||||||
export function setupPropertiesExport(
|
export function setupPropertiesExport(
|
||||||
fn: (
|
fn: (
|
||||||
...args: Parameters<ExpectedExports.properties>
|
...args: Parameters<ExpectedExports.properties>
|
||||||
) => Promise<Properties<PackagePropertiesV2>>
|
) => void | Promise<void> | Promise<Properties<PackagePropertiesV2>>
|
||||||
): ExpectedExports.properties {
|
): ExpectedExports.properties {
|
||||||
return (...args: Parameters<ExpectedExports.properties>) =>
|
return async (...args: Parameters<ExpectedExports.properties>) => {
|
||||||
fn(...args).then((x) => x.build());
|
const result = await fn(...args);
|
||||||
|
if (result) {
|
||||||
|
return result.build();
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "start-sdk",
|
"name": "start-sdk",
|
||||||
"version": "0.4.0-lib0.charlie18",
|
"version": "0.4.0-lib0.charlie19",
|
||||||
"description": "For making the patterns that are wanted in making services for the startOS.",
|
"description": "For making the patterns that are wanted in making services for the startOS.",
|
||||||
"main": "./lib/index.js",
|
"main": "./lib/index.js",
|
||||||
"types": "./lib/index.d.ts",
|
"types": "./lib/index.d.ts",
|
||||||
|
|||||||
Reference in New Issue
Block a user