Skip to main content

Table Interface

A table.

This API is provided as an alpha preview and may change without notice.

For more information about our API support guarantees, see here.

Sealed

This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.

Signature

/** @sealed */
interface Table<TScope extends string | undefined, TCell extends ImplicitAllowedTypes, TColumn extends System_TableSchema.ColumnSchemaBase<TScope, TCell>, TRow extends System_TableSchema.RowSchemaBase<TScope, TCell>>

Type Parameters

Parameter Constraint Description
TScope string | undefined The schema factory scope.
TCell ImplicitAllowedTypes The type of the cells in the table.
TColumn System_TableSchema.ColumnSchemaBase<TScope, TCell> The type of the columns in the table.
TRow System_TableSchema.RowSchemaBase<TScope, TCell> The type of the rows in the table.

Properties

Property Alerts Modifiers Type Description
columns Alpha readonly TreeArrayNode<TColumn> The table's columns.
rows Alpha readonly TreeArrayNode<TRow> The table's rows.

Methods

Method Alerts Return Type Description
getCell(key) Alpha TreeNodeFromImplicitAllowedTypes<TCell> | undefined Gets a cell in the table by column and row IDs.
getColumn(id) Alpha TreeNodeFromImplicitAllowedTypes<TColumn> | undefined Gets a table column by its id.
getRow(id) Alpha TreeNodeFromImplicitAllowedTypes<TRow> | undefined Gets a table row by its id.
insertColumn(params) Alpha TreeNodeFromImplicitAllowedTypes<TColumn> Inserts a column into the table.
insertColumns(params) Alpha TreeNodeFromImplicitAllowedTypes<TColumn>[] Inserts 0 or more columns into the table.
insertRow(params) Alpha TreeNodeFromImplicitAllowedTypes<TRow> Inserts a row into the table.
insertRows(params) Alpha TreeNodeFromImplicitAllowedTypes<TRow>[] Inserts 0 or more rows into the table.
removeAllColumns() Alpha TreeNodeFromImplicitAllowedTypes<TColumn>[] Removes all columns from the table.
removeAllRows() Alpha TreeNodeFromImplicitAllowedTypes<TRow>[] Removes all rows from the table.
removeCell(key) Alpha TreeNodeFromImplicitAllowedTypes<TCell> | undefined Removes the cell at the specified location in the table.
removeColumn(column) Alpha TreeNodeFromImplicitAllowedTypes<TColumn> Removes the specified column from the table.
removeColumns(columns) Alpha TreeNodeFromImplicitAllowedTypes<TColumn>[] Removes 0 or more columns from the table.
removeColumns(columns) Alpha TreeNodeFromImplicitAllowedTypes<TColumn>[] Removes 0 or more columns from the table.
removeRow(row) Alpha TreeNodeFromImplicitAllowedTypes<TRow> Removes the specified row from the table.
removeRows(rows) Alpha TreeNodeFromImplicitAllowedTypes<TRow>[] Removes 0 or more rows from the table.
removeRows(rows) Alpha TreeNodeFromImplicitAllowedTypes<TRow>[] Removes 0 or more rows from the table.
setCell(params) Alpha void Sets the cell at the specified location in the table.

Property Details

columns

The table's columns.

This API is provided as an alpha preview and may change without notice.

For more information about our API support guarantees, see here.

Sealed

This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.

Signature
readonly columns: TreeArrayNode<TColumn>;

Type: TreeArrayNode<TColumn>

rows

The table's rows.

This API is provided as an alpha preview and may change without notice.

For more information about our API support guarantees, see here.

Sealed

This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.

Signature
readonly rows: TreeArrayNode<TRow>;

Type: TreeArrayNode<TRow>

Method Details

getCell

Gets a cell in the table by column and row IDs.

This API is provided as an alpha preview and may change without notice.

For more information about our API support guarantees, see here.

Sealed

This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.

Signature
getCell(key: CellKey<TColumn, TRow>): TreeNodeFromImplicitAllowedTypes<TCell> | undefined;

Parameters

Parameter Type Description
key CellKey<TColumn, TRow> A key that uniquely distinguishes a cell in the table, represented as a combination of the column ID and row ID.

Returns

Return type: TreeNodeFromImplicitAllowedTypes<TCell> | undefined

getColumn

Gets a table column by its id.

This API is provided as an alpha preview and may change without notice.

For more information about our API support guarantees, see here.

Sealed

This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.

Signature
getColumn(id: string): TreeNodeFromImplicitAllowedTypes<TColumn> | undefined;

Parameters

Parameter Type Description
id string

Returns

Return type: TreeNodeFromImplicitAllowedTypes<TColumn> | undefined

getRow

Gets a table row by its id.

This API is provided as an alpha preview and may change without notice.

For more information about our API support guarantees, see here.

Sealed

This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.

Signature
getRow(id: string): TreeNodeFromImplicitAllowedTypes<TRow> | undefined;

Parameters

Parameter Type Description
id string

Returns

Return type: TreeNodeFromImplicitAllowedTypes<TRow> | undefined

insertColumn

Inserts a column into the table.

This API is provided as an alpha preview and may change without notice.

For more information about our API support guarantees, see here.

Sealed

This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.

Signature
insertColumn(params: InsertColumnParameters<TColumn>): TreeNodeFromImplicitAllowedTypes<TColumn>;

Parameters

Parameter Type Description
params InsertColumnParameters<TColumn>

Returns

Return type: TreeNodeFromImplicitAllowedTypes<TColumn>

Error Handling

Throws an error if the specified index is out of range.

No column is inserted in this case.

insertColumns

Inserts 0 or more columns into the table.

This API is provided as an alpha preview and may change without notice.

For more information about our API support guarantees, see here.

Sealed

This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.

Signature
insertColumns(params: InsertColumnsParameters<TColumn>): TreeNodeFromImplicitAllowedTypes<TColumn>[];

Parameters

Parameter Type Description
params InsertColumnsParameters<TColumn>

Returns

Return type: TreeNodeFromImplicitAllowedTypes<TColumn>[]

Error Handling

Throws an error if the specified index is out of range.

No columns are inserted in this case.

insertRow

Inserts a row into the table.

This API is provided as an alpha preview and may change without notice.

For more information about our API support guarantees, see here.

Sealed

This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.

Signature
insertRow(params: InsertRowParameters<TRow>): TreeNodeFromImplicitAllowedTypes<TRow>;

Parameters

Parameter Type Description
params InsertRowParameters<TRow>

Returns

Return type: TreeNodeFromImplicitAllowedTypes<TRow>

Error Handling

Throws an error in the following cases:

  • The row contains cells, but the table does not contain matching columns for one or more of those cells.

  • The specified index is out of range.

No row is inserted in these cases.

insertRows

Inserts 0 or more rows into the table.

This API is provided as an alpha preview and may change without notice.

For more information about our API support guarantees, see here.

Sealed

This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.

Signature
insertRows(params: InsertRowsParameters<TRow>): TreeNodeFromImplicitAllowedTypes<TRow>[];

Parameters

Parameter Type Description
params InsertRowsParameters<TRow>

Returns

Return type: TreeNodeFromImplicitAllowedTypes<TRow>[]

Error Handling

Throws an error in the following cases:

  • The row contains cells, but the table does not contain matching columns for one or more of those cells.

  • The specified index is out of range.

No rows are inserted in these cases.

removeAllColumns

Removes all columns from the table.

This API is provided as an alpha preview and may change without notice.

For more information about our API support guarantees, see here.

Sealed

This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.

Signature
removeAllColumns(): TreeNodeFromImplicitAllowedTypes<TColumn>[];

Returns

The removed columns.

Return type: TreeNodeFromImplicitAllowedTypes<TColumn>[]

removeAllRows

Removes all rows from the table.

This API is provided as an alpha preview and may change without notice.

For more information about our API support guarantees, see here.

Sealed

This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.

Signature
removeAllRows(): TreeNodeFromImplicitAllowedTypes<TRow>[];

Returns

The removed rows.

Return type: TreeNodeFromImplicitAllowedTypes<TRow>[]

removeCell

Removes the cell at the specified location in the table.

This API is provided as an alpha preview and may change without notice.

For more information about our API support guarantees, see here.

Sealed

This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.

Signature
removeCell(key: CellKey<TColumn, TRow>): TreeNodeFromImplicitAllowedTypes<TCell> | undefined;

Parameters

Parameter Type Description
key CellKey<TColumn, TRow>

Returns

The cell if it exists, otherwise undefined.

Return type: TreeNodeFromImplicitAllowedTypes<TCell> | undefined

Error Handling

Throws an error if the location does not exist in the table.

removeColumn

Removes the specified column from the table.

This API is provided as an alpha preview and may change without notice.

For more information about our API support guarantees, see here.

Sealed

This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.

Signature
removeColumn(column: string | TreeNodeFromImplicitAllowedTypes<TColumn>): TreeNodeFromImplicitAllowedTypes<TColumn>;
Remarks

Note: this does not remove any cells from the table's rows. To remove the corresponding cells, use removeCell(key).

Parameters

Parameter Type Description
column string | TreeNodeFromImplicitAllowedTypes<TColumn> The column or column ID to remove.

Returns

Return type: TreeNodeFromImplicitAllowedTypes<TColumn>

Error Handling

Throws an error if the column is not in the table.

removeColumns

Removes 0 or more columns from the table.

This API is provided as an alpha preview and may change without notice.

For more information about our API support guarantees, see here.

Sealed

This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.

Signature
removeColumns(columns: readonly TreeNodeFromImplicitAllowedTypes<TColumn>[]): TreeNodeFromImplicitAllowedTypes<TColumn>[];
Remarks

Note: this does not remove any cells from the table's rows. To remove the corresponding cells, use removeCell(key).

Parameters

Parameter Type Description
columns readonly TreeNodeFromImplicitAllowedTypes<TColumn>[] The columns to remove.

Returns

Return type: TreeNodeFromImplicitAllowedTypes<TColumn>[]

Error Handling

Throws an error if any of the columns are not in the table. In this case, no columns are removed.

removeColumns

Removes 0 or more columns from the table.

This API is provided as an alpha preview and may change without notice.

For more information about our API support guarantees, see here.

Sealed

This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.

Signature
removeColumns(columns: readonly string[]): TreeNodeFromImplicitAllowedTypes<TColumn>[];
Remarks

Note: this does not remove any cells from the table's rows. To remove the corresponding cells, use removeCell(key).

Parameters

Parameter Type Description
columns readonly string[] The columns to remove, specified by their id.

Returns

Return type: TreeNodeFromImplicitAllowedTypes<TColumn>[]

Error Handling

Throws an error if any of the columns are not in the table. In this case, no columns are removed.

removeRow

Removes the specified row from the table.

This API is provided as an alpha preview and may change without notice.

For more information about our API support guarantees, see here.

Sealed

This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.

Signature
removeRow(row: string | TreeNodeFromImplicitAllowedTypes<TRow>): TreeNodeFromImplicitAllowedTypes<TRow>;

Parameters

Parameter Type Description
row string | TreeNodeFromImplicitAllowedTypes<TRow> The row or row ID to remove.

Returns

Return type: TreeNodeFromImplicitAllowedTypes<TRow>

Error Handling

Throws an error if the row is not in the table.

removeRows

Removes 0 or more rows from the table.

This API is provided as an alpha preview and may change without notice.

For more information about our API support guarantees, see here.

Sealed

This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.

Signature
removeRows(rows: readonly TreeNodeFromImplicitAllowedTypes<TRow>[]): TreeNodeFromImplicitAllowedTypes<TRow>[];

Parameters

Parameter Type Description
rows readonly TreeNodeFromImplicitAllowedTypes<TRow>[] The rows to remove.

Returns

Return type: TreeNodeFromImplicitAllowedTypes<TRow>[]

Error Handling

Throws an error if any of the rows are not in the table. In this case, no rows are removed.

removeRows

Removes 0 or more rows from the table.

This API is provided as an alpha preview and may change without notice.

For more information about our API support guarantees, see here.

Sealed

This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.

Signature
removeRows(rows: readonly string[]): TreeNodeFromImplicitAllowedTypes<TRow>[];

Parameters

Parameter Type Description
rows readonly string[] The rows to remove, specified by their id.

Returns

Return type: TreeNodeFromImplicitAllowedTypes<TRow>[]

Error Handling

Throws an error if any of the rows are not in the table. In this case, no rows are removed.

setCell

Sets the cell at the specified location in the table.

This API is provided as an alpha preview and may change without notice.

For more information about our API support guarantees, see here.

Sealed

This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.

Signature
setCell(params: SetCellParameters<TCell, TColumn, TRow>): void;
Remarks

To remove a cell, call removeCell(key) instead.

Parameters

Parameter Type Description
params SetCellParameters<TCell, TColumn, TRow>