@yongdall/model 0.5.2 → 0.6.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/index.d.mts +4 -4
- package/package.json +3 -3
package/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as imodel0 from "imodel";
|
|
2
|
-
import { ClassDecorator, FieldDecorator, FieldDefine, FieldDefineOption, Fields, Hooks, IndexInfo, MainFieldType, TableDefine, ToType
|
|
2
|
+
import { ClassDecorator, FieldDecorator, FieldDefine, FieldDefineOption, Fields, Hooks, IndexInfo, MainFieldType, TableDefine, ToType } from "imodel";
|
|
3
3
|
import * as _yongdall_types0 from "@yongdall/types";
|
|
4
4
|
import { Field, Permission } from "@yongdall/types";
|
|
5
5
|
export * from "imodel";
|
|
@@ -182,7 +182,7 @@ declare function createField<T extends MainFieldType>(type: T, options: {
|
|
|
182
182
|
* @param {ModelOptions} [options]
|
|
183
183
|
* @returns {ModelTable<TF, TT>}
|
|
184
184
|
*/
|
|
185
|
-
declare function createModel<TT extends string | VirtualTable =
|
|
185
|
+
declare function createModel<TT extends string | VirtualTable = any, TF extends Fields = Fields>(table: TT, fields: TF, {
|
|
186
186
|
pseudo,
|
|
187
187
|
indexes,
|
|
188
188
|
hooks,
|
|
@@ -239,7 +239,7 @@ type ModelOptions = {
|
|
|
239
239
|
*/
|
|
240
240
|
pages?: Record<string, string | object | null> | null | undefined;
|
|
241
241
|
};
|
|
242
|
-
type ModelTable<T extends Fields = Fields, TT extends string | VirtualTable | undefined =
|
|
242
|
+
type ModelTable<T extends Fields = Fields, TT extends string | VirtualTable | undefined = any> = TableDefine<T, TT> & {
|
|
243
243
|
databaseId?: string | null;
|
|
244
244
|
};
|
|
245
245
|
//#endregion
|
|
@@ -383,7 +383,7 @@ declare function disabled(disabled?: boolean): FieldDecorator<any>;
|
|
|
383
383
|
* @param {TF} fields
|
|
384
384
|
* @returns {ModelTable}
|
|
385
385
|
*/
|
|
386
|
-
declare function expandModel<TF extends Fields<TableDefine> = Fields<TableDefine<Fields<imodel0.MainFieldType>, string |
|
|
386
|
+
declare function expandModel<TF extends Fields<TableDefine> = Fields<TableDefine<Fields<imodel0.MainFieldType>, string | undefined>>>(model: ModelTable, fields: TF): ModelTable;
|
|
387
387
|
//#endregion
|
|
388
388
|
//#region packages/model/get.d.mts
|
|
389
389
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yongdall/model",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./index.mjs",
|
|
6
6
|
"exports": {
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
"author": "",
|
|
12
12
|
"license": "ISC",
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"imodel": "^0.
|
|
14
|
+
"imodel": "^0.20.1"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
|
-
"@yongdall/types": "^0.
|
|
17
|
+
"@yongdall/types": "^0.6.1"
|
|
18
18
|
}
|
|
19
19
|
}
|