runningTree中出现了几个编译warning
This commit is contained in:
parent
1b8440c8f2
commit
8d8332e0ad
|
|
@ -668,6 +668,7 @@ class ListNode extends Node {
|
|||
});
|
||||
if (withParent && this.parent) {
|
||||
if (this.parent instanceof SingleNode) {
|
||||
// @ts-ignore
|
||||
const filterOfParent = this.parent.getParentFilter(this, ignoreNewParent);
|
||||
if (filterOfParent) {
|
||||
filters.push(filterOfParent);
|
||||
|
|
@ -831,6 +832,7 @@ class SingleNode extends Node {
|
|||
filters;
|
||||
operation;
|
||||
constructor(entity, schema, cache, relationAuth, projection, parent, path, id, filters, actions, cascadeActions) {
|
||||
// @ts-ignore
|
||||
super(entity, schema, cache, relationAuth, projection, parent, path, actions, cascadeActions);
|
||||
this.children = {};
|
||||
this.sr = {};
|
||||
|
|
@ -1567,6 +1569,7 @@ export class RunningTree extends Feature {
|
|||
}
|
||||
if (!parentNode) {
|
||||
assert(!parent && !this.root[path]);
|
||||
// @ts-ignore
|
||||
this.root[path] = node;
|
||||
}
|
||||
node.subscribe(() => {
|
||||
|
|
|
|||
|
|
@ -389,7 +389,7 @@ export function reRender(option, extra) {
|
|||
const oakLoadingMore = this.features.runningTree.isLoadingMore(this.state.oakFullpath);
|
||||
const oakLoading = !oakLoadingMore && this.features.runningTree.isLoading(this.state.oakFullpath);
|
||||
const oakExecuting = this.features.runningTree.isExecuting(this.state.oakFullpath);
|
||||
const oakExecutable = !oakExecuting && this.tryExecute(this.state.oakFullpath);
|
||||
const oakExecutable = !oakExecuting && this.tryExecute();
|
||||
const oakLegalActions = rows && checkActionsAndCascadeEntities.call(this, rows, option);
|
||||
let data = formData
|
||||
? formData.call(this, {
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ export type ActionDef<ED extends EntityDict & BaseEntityDict, T extends keyof ED
|
|||
filter?: ED[T]['Selection']['filter'];
|
||||
data?: Partial<ED[T]['CreateSingle']['data']>;
|
||||
label?: string;
|
||||
attrs?: (keyof ED[T]['Update']['data'])[];
|
||||
} | ED[T]['Action'];
|
||||
export type RowWithActions<ED extends EntityDict & BaseEntityDict, T extends keyof ED> = Partial<ED[T]['Schema']> & {
|
||||
'#oakLegalActions': ActionDef<ED, T>[];
|
||||
|
|
|
|||
|
|
@ -671,6 +671,7 @@ class ListNode extends Node {
|
|||
});
|
||||
if (withParent && this.parent) {
|
||||
if (this.parent instanceof SingleNode) {
|
||||
// @ts-ignore
|
||||
const filterOfParent = this.parent.getParentFilter(this, ignoreNewParent);
|
||||
if (filterOfParent) {
|
||||
filters.push(filterOfParent);
|
||||
|
|
@ -834,6 +835,7 @@ class SingleNode extends Node {
|
|||
filters;
|
||||
operation;
|
||||
constructor(entity, schema, cache, relationAuth, projection, parent, path, id, filters, actions, cascadeActions) {
|
||||
// @ts-ignore
|
||||
super(entity, schema, cache, relationAuth, projection, parent, path, actions, cascadeActions);
|
||||
this.children = {};
|
||||
this.sr = {};
|
||||
|
|
@ -1570,6 +1572,7 @@ class RunningTree extends Feature_1.Feature {
|
|||
}
|
||||
if (!parentNode) {
|
||||
(0, assert_1.assert)(!parent && !this.root[path]);
|
||||
// @ts-ignore
|
||||
this.root[path] = node;
|
||||
}
|
||||
node.subscribe(() => {
|
||||
|
|
|
|||
|
|
@ -393,7 +393,7 @@ function reRender(option, extra) {
|
|||
const oakLoadingMore = this.features.runningTree.isLoadingMore(this.state.oakFullpath);
|
||||
const oakLoading = !oakLoadingMore && this.features.runningTree.isLoading(this.state.oakFullpath);
|
||||
const oakExecuting = this.features.runningTree.isExecuting(this.state.oakFullpath);
|
||||
const oakExecutable = !oakExecuting && this.tryExecute(this.state.oakFullpath);
|
||||
const oakExecutable = !oakExecuting && this.tryExecute();
|
||||
const oakLegalActions = rows && checkActionsAndCascadeEntities.call(this, rows, option);
|
||||
let data = formData
|
||||
? formData.call(this, {
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ export type ActionDef<ED extends EntityDict & BaseEntityDict, T extends keyof ED
|
|||
filter?: ED[T]['Selection']['filter'];
|
||||
data?: Partial<ED[T]['CreateSingle']['data']>;
|
||||
label?: string;
|
||||
attrs?: (keyof ED[T]['Update']['data'])[];
|
||||
} | ED[T]['Action'];
|
||||
export type RowWithActions<ED extends EntityDict & BaseEntityDict, T extends keyof ED> = Partial<ED[T]['Schema']> & {
|
||||
'#oakLegalActions': ActionDef<ED, T>[];
|
||||
|
|
|
|||
|
|
@ -833,6 +833,7 @@ class ListNode<
|
|||
|
||||
if (withParent && this.parent) {
|
||||
if (this.parent instanceof SingleNode) {
|
||||
// @ts-ignore
|
||||
const filterOfParent = this.parent.getParentFilter<T>(this, ignoreNewParent);
|
||||
if (filterOfParent) {
|
||||
filters.push(filterOfParent as any);
|
||||
|
|
@ -1037,6 +1038,7 @@ class SingleNode<ED extends EntityDict & BaseEntityDict,
|
|||
cascadeActions?: () => {
|
||||
[K in keyof ED[T]['Schema']]?: ActionDef<ED, keyof ED>[];
|
||||
}) {
|
||||
// @ts-ignore
|
||||
super(entity, schema, cache, relationAuth, projection, parent, path, actions, cascadeActions);
|
||||
this.children = {};
|
||||
this.sr = {};
|
||||
|
|
@ -1918,6 +1920,7 @@ export class RunningTree<
|
|||
}
|
||||
if (!parentNode) {
|
||||
assert(!parent && !this.root[path]);
|
||||
// @ts-ignore
|
||||
this.root[path] = node;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -481,7 +481,7 @@ export function reRender<
|
|||
const oakLoadingMore = this.features.runningTree.isLoadingMore(this.state.oakFullpath);
|
||||
const oakLoading = !oakLoadingMore && this.features.runningTree.isLoading(this.state.oakFullpath);
|
||||
const oakExecuting = this.features.runningTree.isExecuting(this.state.oakFullpath);
|
||||
const oakExecutable = !oakExecuting && this.tryExecute(this.state.oakFullpath);
|
||||
const oakExecutable = !oakExecuting && this.tryExecute();
|
||||
|
||||
const oakLegalActions = rows && checkActionsAndCascadeEntities.call(
|
||||
this as any,
|
||||
|
|
|
|||
|
|
@ -90,6 +90,7 @@ export type ActionDef<
|
|||
filter?: ED[T]['Selection']['filter'];
|
||||
data?: Partial<ED[T]['CreateSingle']['data']>;
|
||||
label?: string;
|
||||
attrs?: (keyof ED[T]['Update']['data'])[];
|
||||
} | ED[T]['Action'];
|
||||
|
||||
export type RowWithActions<
|
||||
|
|
|
|||
Loading…
Reference in New Issue