Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public publish(
name: string,
queryOrConfig?: table.TContextable | table.TConfig
): table.Table {
const newTable = new table.Table();
newTable.session = this;
utils.setNameAndTarget(this, newTable.proto, name);
if (!!queryOrConfig) {
if (typeof queryOrConfig === "object") {
newTable.config(queryOrConfig);
} else {
newTable.query(queryOrConfig);
}
}
newTable.proto.fileName = utils.getCallerFile(this.rootDir);
this.actions.push(newTable);
return newTable;
}
public publish(
name: string,
queryOrConfig?: table.TContextable | table.TConfig
): table.Table {
const newTable = new table.Table();
newTable.session = this;
this.setNameAndTarget(newTable.proto, name);
if (!!queryOrConfig) {
if (typeof queryOrConfig === "object") {
newTable.config(queryOrConfig);
} else {
newTable.query(queryOrConfig);
}
}
newTable.proto.fileName = utils.getCallerFile(this.rootDir);
this.actions.push(newTable);
return newTable;
}