@omnia/fx-models 8.0.64-vnext → 8.0.66-vnext
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/identities/Identity.d.ts
CHANGED
@@ -14,10 +14,10 @@ export declare abstract class Identity implements IEquals<{
|
|
14
14
|
readonly id: GuidValue;
|
15
15
|
abstract readonly type: IdentityTypes;
|
16
16
|
constructor(id: GuidValue);
|
17
|
-
|
17
|
+
toIdString(): string;
|
18
|
+
get equals(): {
|
18
19
|
identity: (value: Identity) => boolean;
|
19
20
|
};
|
20
|
-
toIdString(): string;
|
21
21
|
static parse(identity: Identity | IResolvedIdentity | string): Identity;
|
22
22
|
static isValid(identity: Identity): boolean;
|
23
23
|
static createFromString(idAndType: string): Identity;
|
package/identities/Identity.js
CHANGED
@@ -6,15 +6,17 @@ const IdentityTypes_1 = require("./IdentityTypes");
|
|
6
6
|
class Identity {
|
7
7
|
constructor(id) {
|
8
8
|
this.id = id;
|
9
|
-
|
9
|
+
}
|
10
|
+
toIdString() {
|
11
|
+
return Identity.getIdAsString(this.id, this.type);
|
12
|
+
}
|
13
|
+
get equals() {
|
14
|
+
return {
|
10
15
|
identity: (value) => {
|
11
16
|
return this.toIdString() === value.toIdString();
|
12
17
|
}
|
13
18
|
};
|
14
19
|
}
|
15
|
-
toIdString() {
|
16
|
-
return Identity.getIdAsString(this.id, this.type);
|
17
|
-
}
|
18
20
|
static parse(identity) {
|
19
21
|
if (typeof identity === "string") {
|
20
22
|
return this.createFromString(identity);
|