@ronin/schema
Advanced tools
Comparing version 0.1.5-leo-ron-1097-experimental-30 to 0.1.5-leo-ron-1097-experimental-31
import { AsyncLocalStorage } from 'node:async_hooks'; | ||
import { QueryItem, PromiseTuple } from './types.js'; | ||
import { Q as Query } from './index.d-CMkIzj0q.js'; | ||
@@ -34,2 +33,16 @@ | ||
/** | ||
* Utility type to convert a tuple of promises into a tuple of their resolved types. | ||
*/ | ||
type PromiseTuple<T extends [Promise<any>, ...Array<Promise<any>>] | Array<Promise<any>>> = { | ||
[P in keyof T]: Awaited<T[P]>; | ||
}; | ||
/** | ||
* Utility type that represents a particular query and any options that should | ||
* be used when executing it. | ||
*/ | ||
interface QueryItem { | ||
query: Query; | ||
options?: Record<string, unknown>; | ||
} | ||
/** | ||
* A list of options that may be passed for every individual query. The type is meant to | ||
@@ -90,2 +103,2 @@ * represent a generic list of options without specific properties. The specific | ||
export { getBatchProxy, getProperty, getSyntaxProxy, setProperty }; | ||
export { type PromiseTuple, type QueryItem, getBatchProxy, getProperty, getSyntaxProxy, setProperty }; |
@@ -198,3 +198,3 @@ import { | ||
// src/queries/index.ts | ||
// src/queries.ts | ||
var RONIN_EXPRESSION_SEPARATOR = "//.//"; | ||
@@ -201,0 +201,0 @@ var IN_BATCH_ASYNC; |
{ | ||
"name": "@ronin/schema", | ||
"version": "0.1.5-leo-ron-1097-experimental-30", | ||
"version": "0.1.5-leo-ron-1097-experimental-31", | ||
"type": "module", | ||
@@ -25,5 +25,2 @@ "description": "Allows for defining the schema of a RONIN database in code.", | ||
"./dist/queries" | ||
], | ||
"types": [ | ||
"./dist/types" | ||
] | ||
@@ -30,0 +27,0 @@ } |
83412
9
2094