本文整理汇总了TypeScript中util.isUndefined函数的典型用法代码示例。如果您正苦于以下问题:TypeScript isUndefined函数的具体用法?TypeScript isUndefined怎么用?TypeScript isUndefined使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了isUndefined函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: getErrMsg
public getErrMsg() {
var errMsg = null;
if( errMsg==null && false===isUndefined(this.details) ) {
errMsg = this.details;
}
if( errMsg==null && false===isUndefined(this.message) ) {
errMsg = this.message;
}
return errMsg;
}
示例2: constructor
constructor(label: string, disabled?: boolean, isChecked?: boolean, subLevelChecklist?: ChecklistModel, value?: any) {
this.label = label;
this.disabled = disabled;
this.isChecked = isChecked;
this.value = isUndefined(value) ? label : value;
this.subLevelChecklist = subLevelChecklist;
}
示例3: constructor
constructor(hostname : string, port : number, secure : boolean) {
if (!port || !hostname || isUndefined(secure)) {
error('ServerLocation object creation failed. Arguments should not be undefined')
}
this.port = port;
this.secure = secure;
this.hostname = hostname;
}
示例4:
.catch((error) => {
if (true !== isUndefined(error.code) && error.code === 'PR5102') {
Loading.hide();
PreparationAlert.success(this.translateService.instant(error.details));
popupService.notiPopup({ name: 'update-dataflow', data: null });
return Promise.reject(null);
}
throw error;
});
示例5: loadConfiguration
export function loadConfiguration(): IConfiguration {
if (fs.existsSync(cfgFile)) {
try {
const obj = yaml.safeLoad(fs.readFileSync(cfgFile, 'utf8')) as any;
const cfg = obj['clubhouse-cli'] as IConfiguration;
if (isUndefined(cfg)) return makeError("Error loading configuration");
return cfg;
} catch (e) {
return makeError(e.message);
}
} else {
return makeError("Configuration file not found");
}
}
示例6: output
public static output(error:any, message?:any): void {
if( error.code && true===error.code.startsWith("PR") ) {
var category = error.code.charAt(2);
var details = error.details;
switch(category) {
case '0':
Alert.success(details ? details : message);
break;
case '1':
Alert.warning(details ? details : message);
break;
case '5':
case '6':
case '7':
default:
if(!isUndefined(details)) { Alert.errorDetail(message, details); } else { Alert.error(message); }
break;
}
} else {
console.error(error);
if(!isUndefined(error.details)) { Alert.errorDetail(message, error.details); } else { Alert.error(message); }
}
}
示例7: rePasswordValidation
/**
* 새로운 패스워드 확인 validation
*/
public rePasswordValidation(): void {
// 비밀번호가 비어 있다면
if (isUndefined(this.rePassword) || this.rePassword === '') {
this.resultRePassword = false;
this.rePasswordMessage = this.translateService.instant('msg.comm.alert.profile.password.re.empty');
return;
}
// 비밀번호가 일치하지 않을 때
if (this.newPassword !== this.rePassword) {
this.resultRePassword = false;
this.rePasswordMessage = this.translateService.instant('msg.comm.alert.profile.password.re.match.not');
return;
}
this.resultRePassword = true;
return;
}
示例8: newPasswordValidation
/**
* 새로운 패스워드 validation
*/
public newPasswordValidation(): void {
// 비밀번호가 비어 있다면
if (isUndefined(this.newPassword) || this.newPassword === '') {
this.resultNewPassword = false;
this.newPasswordMessage = this.translateService.instant('msg.comm.alert.profile.password.new.empty');
return;
}
// 패스워드 확인
if (!StringUtil.isPassword(this.newPassword)) {
this.resultNewPassword = false;
this.newPasswordMessage = this.translateService.instant('msg.comm.alert.profile.password.new.match.not');
return;
}
this.resultNewPassword = true;
return;
}
示例9: passwordValidation
/**
* 현재 패스워드 validation
*/
public passwordValidation(): void {
// 비밀번호가 비어 있다면
if (isUndefined(this.password) || this.password === '') {
this.resultPassword = false;
this.passwordMessage = this.translateService.instant('msg.comm.alert.profile.password.empty');
return;
}
// 비밀번호 체크
this.userService.checkUserPassword(this._userId, this.password)
.then((result) => {
if (result['matched'] === true) {
this.resultPassword = true;
} else {
this.resultPassword = false;
this.passwordMessage = this.translateService.instant('msg.comm.alert.profile.password.match.not');
}
})
.catch((error) => {
this.resultPassword = false;
});
}
示例10: onViewClick
onViewClick(){
if ( isUndefined(this.students)){
this.studentDataService.getStudentsData()
.subscribe(students => this.students = students);
}
}