Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public addTerm(name: string, lcid: number, isAvailableForTagging = true, id = getGUID()): Promise {
const params = MethodParams.build()
.string(name)
.number(lcid)
.string(sanitizeGuid(id));
this._useCaching = false;
return this.invokeMethod("CreateTerm", params,
setProperty("IsAvailableForTagging", "Boolean", `${isAvailableForTagging}`))
.then(r => extend(this.termSet.getTermById(r.Id), r));
}
public addTerm(name: string, lcid: number, isAvailableForTagging = true, id = getGUID()): Promise {
const params = MethodParams.build()
.string(name)
.number(lcid)
.string(sanitizeGuid(id));
this._useCaching = false;
return this.invokeMethod("CreateTerm", params,
setProperty("IsAvailableForTagging", "Boolean", `${isAvailableForTagging}`))
.then(r => assign(this.getTermById(r.Id), r));
}