01c9c3fa0e
* feat(objectsender): wip serializer and sender * feat(objectsender): mostly done * feat(objectsender): chores * feat(objectsender): chores * build refactor * linting issue fix * minor type adjustments * adding in type definitions into build * sha tests * config fix * fixed up servertransport * added tests to ci * added coverage * storing coverage? --------- Co-authored-by: Kristaps Fabians Geikins <fabis94@live.com>
16 lines
541 B
TypeScript
16 lines
541 B
TypeScript
/* eslint-disable camelcase */
|
|
/**
|
|
* Basic 'Base'-like object from .NET. It will create a 'speckle_type' prop that defaults to the class' name. This can be overriden by providing yourself a 'speckle_type' property in the props argument of the constructor.
|
|
*/
|
|
export class Base implements Record<string, unknown> {
|
|
speckle_type: string
|
|
constructor(props?: Record<string, unknown>) {
|
|
this.speckle_type = this.constructor.name
|
|
|
|
if (props) {
|
|
for (const key in props) this[key] = props[key]
|
|
}
|
|
}
|
|
[x: string]: unknown
|
|
}
|