mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-06 15:57:13 +00:00
Merge pull request #34572 from L2jLiga/remove-xmlbuilder
[xmlbuilder] Remove types
This commit is contained in:
@@ -3060,6 +3060,12 @@
|
||||
"sourceRepoURL": "https://github.com/nashwaan/xml-js",
|
||||
"asOfVersion": "1.0.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "xmlbuilder",
|
||||
"typingsPackageName": "xmlbuilder",
|
||||
"sourceRepoURL": "https://github.com/oozcitak/xmlbuilder-js",
|
||||
"asOfVersion": "11.0.1"
|
||||
},
|
||||
{
|
||||
"libraryName": "@xmpp/jid",
|
||||
"typingsPackageName": "xmpp__jid",
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"xmlbuilder": ">=11.0.1"
|
||||
}
|
||||
}
|
||||
Vendored
-134
@@ -1,134 +0,0 @@
|
||||
// Type definitions for xmlbuilder
|
||||
// Project: https://github.com/oozcitak/xmlbuilder-js
|
||||
// Definitions by: Wallymathieu <https://github.com/wallymathieu>
|
||||
// : GaikwadPratik <https://github.com/GaikwadPratik>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export = xmlbuilder;
|
||||
|
||||
declare namespace xmlbuilder {
|
||||
|
||||
class XMLDocType {
|
||||
clone(): XMLDocType;
|
||||
element(name: string, value?: Object): XMLDocType;
|
||||
attList(elementName: string, attributeName: string, attributeType: string, defaultValueType?: string, defaultValue?: any): XMLDocType;
|
||||
entity(name: string, value: any): XMLDocType;
|
||||
pEntity(name: string, value: any): XMLDocType;
|
||||
notation(name: string, value: any): XMLDocType;
|
||||
cdata(value: string): XMLDocType;
|
||||
comment(value: string): XMLDocType;
|
||||
instruction(target: string, value: any): XMLDocType;
|
||||
root(): XMLDocType;
|
||||
document(): any;
|
||||
toString(options?: XMLToStringOptions, level?: Number): string;
|
||||
|
||||
ele(name: string, value?: Object): XMLDocType;
|
||||
att(elementName: string, attributeName: string, attributeType: string, defaultValueType?: string, defaultValue?: any): XMLDocType;
|
||||
ent(name: string, value: any): XMLDocType;
|
||||
pent(name: string, value: any): XMLDocType;
|
||||
not(name: string, value: any): XMLDocType;
|
||||
dat(value: string): XMLDocType;
|
||||
com(value: string): XMLDocType;
|
||||
ins(target: string, value: any): XMLDocType;
|
||||
up(): XMLDocType;
|
||||
doc(): any;
|
||||
}
|
||||
|
||||
class XMLElementOrXMLNode {
|
||||
// XMLElement:
|
||||
clone(): XMLElementOrXMLNode;
|
||||
attribute(name: any, value?: any): XMLElementOrXMLNode;
|
||||
att(name: any, value?: any): XMLElementOrXMLNode;
|
||||
removeAttribute(name: string): XMLElementOrXMLNode;
|
||||
instruction(target: string, value: any): XMLElementOrXMLNode;
|
||||
instruction(array: Array<any>): XMLElementOrXMLNode;
|
||||
instruction(obj: Object): XMLElementOrXMLNode;
|
||||
ins(target: string, value: any): XMLElementOrXMLNode;
|
||||
ins(array: Array<any>): XMLElementOrXMLNode;
|
||||
ins(obj: Object): XMLElementOrXMLNode;
|
||||
a(name: any, value?: any): XMLElementOrXMLNode;
|
||||
i(target: string, value: any): XMLElementOrXMLNode;
|
||||
i(array: Array<any>): XMLElementOrXMLNode;
|
||||
i(obj: Object): XMLElementOrXMLNode;
|
||||
toString(options?: XMLToStringOptions, level?: Number): string;
|
||||
// XMLNode:
|
||||
element(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode;
|
||||
ele(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode;
|
||||
insertBefore(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode;
|
||||
insertAfter(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode;
|
||||
remove(): XMLElementOrXMLNode;
|
||||
node(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode;
|
||||
text(value: string): XMLElementOrXMLNode;
|
||||
cdata(value: string): XMLElementOrXMLNode;
|
||||
comment(value: string): XMLElementOrXMLNode;
|
||||
raw(value: string): XMLElementOrXMLNode;
|
||||
declaration(version: string, encoding: string, standalone: boolean): XMLElementOrXMLNode;
|
||||
doctype(pubID: string, sysID: string): XMLDocType;
|
||||
up(): XMLElementOrXMLNode;
|
||||
importDocument(input: XMLElementOrXMLNode): XMLElementOrXMLNode;
|
||||
root(): XMLElementOrXMLNode;
|
||||
document(): any;
|
||||
end(options?: XMLEndOptions): string;
|
||||
prev(): XMLElementOrXMLNode;
|
||||
next(): XMLElementOrXMLNode;
|
||||
nod(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode;
|
||||
txt(value: string): XMLElementOrXMLNode;
|
||||
dat(value: string): XMLElementOrXMLNode;
|
||||
com(value: string): XMLElementOrXMLNode;
|
||||
doc(): XMLElementOrXMLNode;
|
||||
dec(version: string, encoding: string, standalone: boolean): XMLElementOrXMLNode;
|
||||
dtd(pubID: string, sysID: string): XMLDocType;
|
||||
e(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode;
|
||||
n(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode;
|
||||
t(value: string): XMLElementOrXMLNode;
|
||||
d(value: string): XMLElementOrXMLNode;
|
||||
c(value: string): XMLElementOrXMLNode;
|
||||
r(value: string): XMLElementOrXMLNode;
|
||||
u(): XMLElementOrXMLNode;
|
||||
}
|
||||
|
||||
interface XMLDec {
|
||||
version?: string;
|
||||
encoding?: string;
|
||||
standalone?: boolean;
|
||||
}
|
||||
|
||||
interface XMLDtd {
|
||||
pubID?: string;
|
||||
sysID?: string;
|
||||
}
|
||||
|
||||
interface XMLStringifier {
|
||||
[x: string]: ((v: any) => string) | string;
|
||||
}
|
||||
|
||||
interface XMLWriter {
|
||||
[x: string]: ((e: XMLElementOrXMLNode, level?: number) => void);
|
||||
}
|
||||
|
||||
interface XMLCreateOptions {
|
||||
headless?: boolean;
|
||||
keepNullNodes?: boolean;
|
||||
keepNullAttributes?: boolean;
|
||||
ignoreDecorators?: boolean;
|
||||
separateArrayItems?: boolean;
|
||||
noDoubleEncoding?: boolean;
|
||||
stringify?: XMLStringifier;
|
||||
}
|
||||
|
||||
interface XMLToStringOptions {
|
||||
pretty?: boolean;
|
||||
indent?: string;
|
||||
offset?: number;
|
||||
newline?: string;
|
||||
allowEmpty?: boolean;
|
||||
spacebeforeslash?: string;
|
||||
}
|
||||
|
||||
interface XMLEndOptions extends XMLToStringOptions {
|
||||
writer?: XMLWriter;
|
||||
}
|
||||
|
||||
function create(nameOrObjSpec: string | { [name: string]: Object }, xmldecOrOptions?: XMLDec | XMLCreateOptions, doctypeOrOptions?: XMLDtd | XMLCreateOptions, options?: XMLCreateOptions): XMLElementOrXMLNode;
|
||||
function begin(): XMLElementOrXMLNode;
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": false,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"xmlbuilder-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -1,80 +0,0 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json",
|
||||
"rules": {
|
||||
"adjacent-overload-signatures": false,
|
||||
"array-type": false,
|
||||
"arrow-return-shorthand": false,
|
||||
"ban-types": false,
|
||||
"callable-types": false,
|
||||
"comment-format": false,
|
||||
"dt-header": false,
|
||||
"npm-naming": false,
|
||||
"eofline": false,
|
||||
"export-just-namespace": false,
|
||||
"import-spacing": false,
|
||||
"interface-name": false,
|
||||
"interface-over-type-literal": false,
|
||||
"jsdoc-format": false,
|
||||
"max-line-length": false,
|
||||
"member-access": false,
|
||||
"new-parens": false,
|
||||
"no-any-union": false,
|
||||
"no-boolean-literal-compare": false,
|
||||
"no-conditional-assignment": false,
|
||||
"no-consecutive-blank-lines": false,
|
||||
"no-construct": false,
|
||||
"no-declare-current-package": false,
|
||||
"no-duplicate-imports": false,
|
||||
"no-duplicate-variable": false,
|
||||
"no-empty-interface": false,
|
||||
"no-for-in-array": false,
|
||||
"no-inferrable-types": false,
|
||||
"no-internal-module": false,
|
||||
"no-irregular-whitespace": false,
|
||||
"no-mergeable-namespace": false,
|
||||
"no-misused-new": false,
|
||||
"no-namespace": false,
|
||||
"no-object-literal-type-assertion": false,
|
||||
"no-padding": false,
|
||||
"no-redundant-jsdoc": false,
|
||||
"no-redundant-jsdoc-2": false,
|
||||
"no-redundant-undefined": false,
|
||||
"no-reference-import": false,
|
||||
"no-relative-import-in-test": false,
|
||||
"no-self-import": false,
|
||||
"no-single-declare-module": false,
|
||||
"no-string-throw": false,
|
||||
"no-unnecessary-callback-wrapper": false,
|
||||
"no-unnecessary-class": false,
|
||||
"no-unnecessary-generics": false,
|
||||
"no-unnecessary-qualifier": false,
|
||||
"no-unnecessary-type-assertion": false,
|
||||
"no-useless-files": false,
|
||||
"no-var-keyword": false,
|
||||
"no-var-requires": false,
|
||||
"no-void-expression": false,
|
||||
"no-trailing-whitespace": false,
|
||||
"object-literal-key-quotes": false,
|
||||
"object-literal-shorthand": false,
|
||||
"one-line": false,
|
||||
"one-variable-per-declaration": false,
|
||||
"only-arrow-functions": false,
|
||||
"prefer-conditional-expression": false,
|
||||
"prefer-const": false,
|
||||
"prefer-declare-function": false,
|
||||
"prefer-for-of": false,
|
||||
"prefer-method-signature": false,
|
||||
"prefer-template": false,
|
||||
"radix": false,
|
||||
"semicolon": false,
|
||||
"space-before-function-paren": false,
|
||||
"space-within-parens": false,
|
||||
"strict-export-declare-modifiers": false,
|
||||
"trim-file": false,
|
||||
"triple-equals": false,
|
||||
"typedef-whitespace": false,
|
||||
"unified-signatures": false,
|
||||
"void-return": false,
|
||||
"whitespace": false
|
||||
}
|
||||
}
|
||||
@@ -1,115 +0,0 @@
|
||||
|
||||
import xmlbuilder = require('xmlbuilder');
|
||||
var xml = xmlbuilder.create;
|
||||
var doc = xmlbuilder.begin;
|
||||
|
||||
// https://github.com/oozcitak/xmlbuilder-js/blob/master/test/comment.coffee
|
||||
xml('comment', {}, {}, { headless: true }).comment('<>\'"&\t\n\r').end();
|
||||
|
||||
// https://github.com/oozcitak/xmlbuilder-js/blob/master/test/instructions.coffee
|
||||
xml('test17', { headless: true }).ins('pi', 'mypi').end();
|
||||
|
||||
xml('test17', { headless: true }).ins({ 'pi': 'mypi', 'pi2': 'mypi2', 'pi3': null }).end();
|
||||
|
||||
xml('test17', { headless: true }).ins(['pi', 'pi2']).end();
|
||||
|
||||
xml('test18', { headless: true })
|
||||
.ins('renderCache.subset', '"Verdana" 0 0 ISO-8859-1 4 268 67 "#(),-./')
|
||||
.ins('pitarget', () => 'pivalue')
|
||||
.end();
|
||||
|
||||
// https://github.com/oozcitak/xmlbuilder-js/blob/master/test/createxml.coffee
|
||||
xml('root')
|
||||
.ele('xmlbuilder')
|
||||
.att('for', 'node-js')
|
||||
.com('CoffeeScript is awesome.')
|
||||
.nod('repo')
|
||||
.att('type', 'git')
|
||||
.txt('git://github.com/oozcitak/xmlbuilder-js.git')
|
||||
.up()
|
||||
.up()
|
||||
.ele('test')
|
||||
.att('escaped', 'chars <>\'"&\t\n\r')
|
||||
.txt('complete 100%<>\'"&\t\n\r')
|
||||
.up()
|
||||
.ele('cdata')
|
||||
.cdata('<test att="val">this is a test</test>\nSecond line')
|
||||
.up()
|
||||
.ele('raw')
|
||||
.raw('&<>&')
|
||||
.up()
|
||||
.ele('atttest', { 'att': 'val' }, 'text')
|
||||
.up()
|
||||
.ele('atttest', 'text')
|
||||
.end();
|
||||
|
||||
// https://github.com/oozcitak/xmlbuilder-js/blob/master/test/basic/begin.coffee
|
||||
doc().ele('root', { att: 'val' }).ele('test').end();
|
||||
|
||||
xml({
|
||||
displayNotification: {
|
||||
level: 'error',
|
||||
message: 'an error occurred'
|
||||
}
|
||||
});
|
||||
|
||||
// https://github.com/oozcitak/xmlbuilder-js/wiki#create
|
||||
xml('root', {
|
||||
stringify: {
|
||||
eleName: function(val) {
|
||||
return 'myns:' + val;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// https://github.com/oozcitak/xmlbuilder-js/wiki#converting-to-string
|
||||
xml('root').end({
|
||||
pretty: true,
|
||||
indent: ' ',
|
||||
newline: '\n',
|
||||
allowEmpty: false,
|
||||
spacebeforeslash: ''
|
||||
});
|
||||
|
||||
xml('root').ele('child').toString({
|
||||
pretty: true,
|
||||
indent: ' ',
|
||||
offset: 1,
|
||||
newline: '\n',
|
||||
spacebeforeslash: ''
|
||||
});
|
||||
|
||||
// https://github.com/oozcitak/xmlbuilder-js/wiki#xml-writers
|
||||
xml('root').end({
|
||||
writer: {
|
||||
document: (doc) => { },
|
||||
attribute: (doc) => { },
|
||||
cdata: (node, level) => { },
|
||||
comment: (node, level) => { },
|
||||
declaration: (node, level) => { },
|
||||
docType: (node, level) => { },
|
||||
element: (node, level) => { },
|
||||
processingInstruction: (node, level) => { },
|
||||
raw: (node, level) => { },
|
||||
text: (node, level) => { },
|
||||
dtdAttList: (node, level) => { },
|
||||
dtdElement: (node, level) => { },
|
||||
dtdEntity: (node, level) => { },
|
||||
dtdNotation: (node, level) => { },
|
||||
}
|
||||
});
|
||||
|
||||
// https://github.com/oozcitak/xmlbuilder-js/wiki/XML-Prolog
|
||||
xml('xbel',
|
||||
{ version: '1.0', encoding: 'UTF-8'},
|
||||
{ pubID: '+//IDN python.org//DTD XML Bookmark Exchange Language 1.0//EN//XML',
|
||||
sysID: 'http://www.python.org/topics/xml/dtds/xbel-1.0.dtd'
|
||||
}
|
||||
);
|
||||
|
||||
xml('root')
|
||||
.dec('1.0', 'UTF-8', true)
|
||||
.ele('node');
|
||||
|
||||
xml('HTML')
|
||||
.dtd('-//W3C//DTD HTML 4.01//EN', 'http://www.w3.org/TR/html4/strict.dtd');
|
||||
Reference in New Issue
Block a user