本文整理汇总了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;
}
开发者ID:bchin22,项目名称:metatron-discovery,代码行数:12,代码来源:preparation-alert.util.ts
示例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;
}
开发者ID:onap-sdc,项目名称:sdc-ui,代码行数:7,代码来源:ChecklistItem.ts
示例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;
}
开发者ID:AndrienkoAleksandr,项目名称:che,代码行数:8,代码来源:server-location.ts
示例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;
});
开发者ID:bchin22,项目名称:metatron-discovery,代码行数:9,代码来源:dataflow.service.ts
示例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");
}
}
开发者ID:tyrchen,项目名称:clubhouse-cli,代码行数:14,代码来源:configuration.ts
示例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); }
}
}
开发者ID:bchin22,项目名称:metatron-discovery,代码行数:23,代码来源:preparation-alert.util.ts
示例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;
}
开发者ID:bchin22,项目名称:metatron-discovery,代码行数:19,代码来源:change-password.component.ts
示例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;
}
开发者ID:bchin22,项目名称:metatron-discovery,代码行数:19,代码来源:change-password.component.ts
示例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;
});
}
开发者ID:bchin22,项目名称:metatron-discovery,代码行数:24,代码来源:change-password.component.ts
示例10: onViewClick
onViewClick(){
if ( isUndefined(this.students)){
this.studentDataService.getStudentsData()
.subscribe(students => this.students = students);
}
}
开发者ID:chartchai,项目名称:SE331-lab12,代码行数:6,代码来源:menu.component.ts
注:本文中的util.isUndefined函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论