重新命名
This commit is contained in:
parent
985be2230c
commit
f48a931993
|
|
@ -1,6 +1,6 @@
|
|||
import { Context, EntityDict, OperateParams, OperationResult, SelectionResult } from "oak-domain/lib/types";
|
||||
import { AmapInstance } from "oak-external-sdk";
|
||||
export declare type AspectDict<ED extends EntityDict, Cxt extends Context<ED>> = {
|
||||
export declare type CommonAspectDict<ED extends EntityDict, Cxt extends Context<ED>> = {
|
||||
operate: <T extends keyof ED>(options: {
|
||||
entity: T;
|
||||
operation: ED[T]['Operation'] | ED[T]['Operation'][];
|
||||
|
|
@ -8,3 +8,4 @@ declare const aspectDict: {
|
|||
getTranslations: typeof getTranslations;
|
||||
};
|
||||
export default aspectDict;
|
||||
export * from './AspectDict';
|
||||
|
|
|
|||
11
lib/index.js
11
lib/index.js
|
|
@ -1,4 +1,14 @@
|
|||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
||||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const crud_1 = require("./crud");
|
||||
const amap_1 = require("./amap");
|
||||
|
|
@ -10,3 +20,4 @@ const aspectDict = {
|
|||
getTranslations: locales_1.getTranslations,
|
||||
};
|
||||
exports.default = aspectDict;
|
||||
__exportStar(require("./AspectDict"), exports);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { Context, EntityDict, OperateParams, OperationResult, SelectionResult } from "oak-domain/lib/types";
|
||||
import { AmapInstance } from "oak-external-sdk";
|
||||
|
||||
export type AspectDict<ED extends EntityDict, Cxt extends Context<ED>> = {
|
||||
export type CommonAspectDict<ED extends EntityDict, Cxt extends Context<ED>> = {
|
||||
operate: <T extends keyof ED>(options: { entity: T, operation: ED[T]['Operation'] | ED[T]['Operation'][], params?: OperateParams }, context: Cxt) => Promise<OperationResult<ED>[] | OperationResult<ED>>,
|
||||
select: <T extends keyof ED, S extends ED[T]['Selection']>(options: { entity: T, selection: ED[T]['Selection'], params?: object }, context: Cxt) => Promise<SelectionResult<ED[T]['Schema'], S['data']>>,
|
||||
amap: <T extends 'getDrivingPath' | 'regeo' | 'ipLoc' | 'getDistrict' | 'geocode'>(options: {
|
||||
|
|
@ -8,4 +8,5 @@ const aspectDict = {
|
|||
getTranslations,
|
||||
};
|
||||
|
||||
export default aspectDict;
|
||||
export default aspectDict;
|
||||
export * from './AspectDict';
|
||||
Loading…
Reference in New Issue