@sitecore/sc-contenthub-webclient-sdk
Version:
Sitecore Content Hub WebClient SDK.
20 lines • 735 B
JavaScript
import Guard from "../../guard";
import { MemberDefinitionType } from "./member-definition-type";
export class MemberBase {
constructor(name, definitionType) {
Guard.stringNotNullOrEmpty(name);
this.name = name;
this.definitionType = definitionType;
}
/**
* Returns a string representation of the current member instance.
*
* @remarks
* Can not be used for serialization. Only useful during debugging or testing.
* Returned format: \<member name\> ({@link MemberDefinitionType}) (\<constructor.name\>)
*/
toString() {
return `${this.name} (${MemberDefinitionType[this.definitionType]}) (${this.constructor.name})`;
}
}
//# sourceMappingURL=member.js.map