本文整理汇总了TypeScript中mobx.IObservableValue.get方法的典型用法代码示例。如果您正苦于以下问题:TypeScript IObservableValue.get方法的具体用法?TypeScript IObservableValue.get怎么用?TypeScript IObservableValue.get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mobx.IObservableValue
的用法示例。
在下文中一共展示了IObservableValue.get方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: is
@computed
public get is(): boolean {
// console.log(`GET:${this.objectId()}:`, this.value);
if (typeof(this.value.get()) === 'boolean') {
return this.value.get();
}
return this.parent.is;
}
示例2: verifyText
public verifyText(): string[] {
const ret: string[] = [];
if (!this.match.test(this.pin.get())) {
ret.push(`Pin does not match:${this.match.toString()}`);
}
return ret;
}
示例3: verifyText
public verifyText(): string[] {
let ret: string[] = [];
if (this.fingerprint.length == 0) {
ret.push('fingerprint had to set.');
}
if (typeof this.slot_id.get() !== 'number' && this.slot_id.get() < 0) {
ret.push('slot_id not set.');
}
if (this.card_id.length == 0) {
ret.push('card-id had to be set.');
}
ret = ret.concat(this.admin_pin.verifyText());
if (typeof this.passphrase.get() !== 'string' || this.passphrase.get().length <= 8) {
ret.push('passphrase had to be set.');
}
return ret;
}
示例4: asKeyToYubiKey
public asKeyToYubiKey(fpr: string, slot_id: number): KeyToYubiKey {
const ktyk = new KeyToYubiKey({
slot_id,
card_id: this.smartCardId.get(),
admin_pin: new Pin({ pin: '12345678'}),
fingerprint: fpr,
passphrase: this.passPhrase.getPassPhrase(),
});
return ktyk;
}
示例5: toObj
public toObj(): any {
return {
smartCardId: this.smartCardId.get(),
warrents: this.warrents.toObj(),
common: this.common.toObj(),
passPhrase: this.passPhrase.toObj(),
adminKey: this.adminKey.toObj(),
userKey: this.userKey.toObj(),
};
}
示例6: toObj
public toObj(): DateValueObj {
return {
formatDate: this.formatDate.get(),
errText: this.errText
};
}
示例7: isoString
@computed
public get isoString(): string {
return this.date.get().toISOString();
}
示例8: valid
@computed
public get valid(): boolean {
const tomorrow = new Date(Date.now());
tomorrow.setHours(tomorrow.getHours() + 24);
return this.date.get().getTime() > tomorrow.getTime();
}
示例9: readable
@computed
public get readable(): boolean {
return this._readable.get();
}
示例10: readOnly
@computed
public get readOnly(): boolean {
return this._readOnly.get();
}