Merged PR 216: Deprecate parent from IContainerModel for FindContainerById
This commit is contained in:
parent
d40cd8cf8e
commit
b4eba6bb9b
19 changed files with 97 additions and 109 deletions
|
@ -2,9 +2,6 @@ import { IContainerProperties } from './IContainerProperties';
|
|||
|
||||
export interface IContainerModel {
|
||||
children: string[]
|
||||
// TODO: Remove parent now that accessing the parent by id is faster.
|
||||
// TODO: Use GetContainerById(container.properties.parentId) as the better alternative.
|
||||
parent: IContainerModel | null
|
||||
properties: IContainerProperties
|
||||
userData: Record<string, string | number>
|
||||
}
|
||||
|
@ -15,18 +12,13 @@ export interface IContainerModel {
|
|||
*/
|
||||
export class ContainerModel implements IContainerModel {
|
||||
public children: string[];
|
||||
// TODO: Remove parent now that accessing the parent by id is faster.
|
||||
// TODO: Use GetContainerById(container.properties.parentId) as the better alternative.
|
||||
public parent: IContainerModel | null;
|
||||
public properties: IContainerProperties;
|
||||
public userData: Record<string, string | number>;
|
||||
|
||||
constructor(
|
||||
parent: IContainerModel | null,
|
||||
properties: IContainerProperties,
|
||||
children: string[] = [],
|
||||
userData = {}) {
|
||||
this.parent = parent;
|
||||
this.properties = properties;
|
||||
this.children = children;
|
||||
this.userData = userData;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue