enhance signature of create for conversion from object (#16381)

This commit is contained in:
Klaus Sevensleeper
2017-05-10 17:14:56 +02:00
committed by Andy
parent 8868f90acf
commit ac9bfc4eec
2 changed files with 8 additions and 1 deletions

View File

@@ -85,5 +85,5 @@ declare class XMLElementOrXMLNode {
}
declare namespace xmlbuilder {
function create(name: string, xmldec?: Object, doctype?: any, options?: Object): XMLElementOrXMLNode;
function create(nameOrObjSpec: string | { [name:string]: Object }, xmldec?: Object, doctype?: any, options?: Object): XMLElementOrXMLNode;
}

View File

@@ -41,3 +41,10 @@ xml('root')
.up()
.ele('atttest', 'text')
.end();
xml({
displayNotification: {
level: 'error',
message: 'an error occurred'
}
});