Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(public readonly value: Base64EncodedString) {
super();
ensure(Photo.name, value, isDefined(), isString(), looksLikeBase64Encoded());
}
}
static fromJSON(o: JSONObject) {
const type: string = ensure('serialised tag type', o.type, isDefined(), isString()) as string;
const found = Object.keys(TagTypes).find(t => TagTypes[t].Type === type) || TagTypes.ArbitraryTag.name;
return new TagTypes[found](o.name);
}