模板文件
This commit is contained in:
parent
1ca94a0c14
commit
de867204eb
|
|
@ -6,7 +6,7 @@
|
|||
"scripts": {
|
||||
"build": "tsc",
|
||||
"dev": "tsc --watch",
|
||||
"test": "ts-node test.ts"
|
||||
"test": "cd .. && oak-cli create ttt -d"
|
||||
},
|
||||
"bin": {
|
||||
"oak-cli": "lib/index.js"
|
||||
|
|
|
|||
|
|
@ -2,13 +2,13 @@ import { EntityDict } from '@project/oak-app-domain';
|
|||
import { SelectOpResult } from 'oak-domain/lib/types/Entity';
|
||||
import { makeException as makeDomainException } from 'oak-domain/lib/types/Exception';
|
||||
|
||||
export default function makeException(data: {
|
||||
export default function makeException<ED extends EntityDict>(data: {
|
||||
name: string;
|
||||
message?: string;
|
||||
opRecords: SelectOpResult<EntityDict>;
|
||||
opRecords: SelectOpResult<ED>;
|
||||
[A: string]: any;
|
||||
}) {
|
||||
const e = makeDomainException<EntityDict>(data);
|
||||
const e = makeDomainException<ED>(data);
|
||||
|
||||
return e;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,9 +19,9 @@ import { initialize as initFrontend } from 'oak-frontend-base/es/initialize';
|
|||
import { BasicFeatures } from 'oak-frontend-base/es/features';
|
||||
|
||||
export default function initialize() {
|
||||
const totalCheckers = mergeConcatMany([checkers] as Array<typeof checkers>),
|
||||
totalCommon = mergeConcatMany([common] as Array<typeof common>),
|
||||
totalRender = mergeConcatMany([render] as Array<typeof render>);
|
||||
const totalCheckers = mergeConcatMany([checkers] as Array<typeof checkers>)!,
|
||||
totalCommon = mergeConcatMany([common] as Array<typeof common>)!,
|
||||
totalRender = mergeConcatMany([render] as Array<typeof render>)!;
|
||||
|
||||
const totalFeatures = {} as FeatureDict & BasicFeatures<EntityDict>;
|
||||
const { features } = initFrontend<EntityDict, BackendRuntimeContext, FrontendRuntimeContext>(
|
||||
|
|
|
|||
Loading…
Reference in New Issue