claude-flow
Version:
Enterprise-grade AI agent orchestration with ruv-swarm integration (Alpha Release)
153 lines (138 loc) • 5.92 kB
TypeScript
// 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 {
constructor(): XMLDocType;
constructor(name: string, value?: Object): XMLDocType;
constructor(elementName: string, attributeName: string, attributeType: string, defaultValueType?: string, defaultValue?: any): XMLDocType;
constructor(name: string, value: any): XMLDocType;
constructor(name: string, value: any): XMLDocType;
constructor(name: string, value: any): XMLDocType;
constructor(value: string): XMLDocType;
constructor(value: string): XMLDocType;
constructor(target: string, value: any): XMLDocType;
constructor(): XMLDocType;
constructor(): any;
constructor(options?: XMLToStringOptions, level?: Number): string;
constructor(name: string, value?: Object): XMLDocType;
constructor(elementName: string, attributeName: string, attributeType: string, defaultValueType?: string, defaultValue?: any): XMLDocType;
constructor(name: string, value: any): XMLDocType;
constructor(name: string, value: any): XMLDocType;
constructor(name: string, value: any): XMLDocType;
constructor(value: string): XMLDocType;
constructor(value: string): XMLDocType;
constructor(target: string, value: any): XMLDocType;
constructor(): XMLDocType;
constructor(): any;
}
class XMLElementOrXMLNode {
// XMLElement:
constructor(): XMLElementOrXMLNode;
constructor(name: any, value?: any): XMLElementOrXMLNode;
constructor(name: any, value?: any): XMLElementOrXMLNode;
constructor(name: string): XMLElementOrXMLNode;
constructor(target: string, value: any): XMLElementOrXMLNode;
constructor(array: Array<any>): XMLElementOrXMLNode;
constructor(obj: Object): XMLElementOrXMLNode;
constructor(target: string, value: any): XMLElementOrXMLNode;
constructor(array: Array<any>): XMLElementOrXMLNode;
constructor(obj: Object): XMLElementOrXMLNode;
constructor(name: any, value?: any): XMLElementOrXMLNode;
constructor(target: string, value: any): XMLElementOrXMLNode;
constructor(array: Array<any>): XMLElementOrXMLNode;
constructor(obj: Object): XMLElementOrXMLNode;
constructor(options?: XMLToStringOptions, level?: Number): string;
// XMLNode:
constructor(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode;
constructor(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode;
constructor(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode;
constructor(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode;
constructor(): XMLElementOrXMLNode;
constructor(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode;
constructor(value: string): XMLElementOrXMLNode;
constructor(value: string): XMLElementOrXMLNode;
constructor(value: string): XMLElementOrXMLNode;
constructor(value: string): XMLElementOrXMLNode;
constructor(version: string, encoding: string, standalone: boolean): XMLElementOrXMLNode;
constructor(pubID: string, sysID: string): XMLDocType;
constructor(): XMLElementOrXMLNode;
constructor(input: XMLElementOrXMLNode): XMLElementOrXMLNode;
constructor(): XMLElementOrXMLNode;
constructor(): any;
constructor(options?: XMLEndOptions): string;
constructor(): XMLElementOrXMLNode;
constructor(): XMLElementOrXMLNode;
constructor(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode;
constructor(value: string): XMLElementOrXMLNode;
constructor(value: string): XMLElementOrXMLNode;
constructor(value: string): XMLElementOrXMLNode;
constructor(): XMLElementOrXMLNode;
constructor(version: string, encoding: string, standalone: boolean): XMLElementOrXMLNode;
constructor(pubID: string, sysID: string): XMLDocType;
constructor(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode;
constructor(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode;
constructor(value: string): XMLElementOrXMLNode;
constructor(value: string): XMLElementOrXMLNode;
constructor(value: string): XMLElementOrXMLNode;
constructor(value: string): XMLElementOrXMLNode;
constructor(): 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, options: WriterOptions, 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;
}
interface WriterOptions {
pretty?: boolean;
indent?: string;
newline?: string;
offset?: number;
allowEmpty?: boolean;
dontPrettyTextNodes?: boolean;
spaceBeforeSlash?: string | boolean;
user? :any;
state?: WriterState;
}
enum WriterState {
None = 0,
OpenTag = 1,
InsideTag = 2,
CloseTag = 3
}
function create(nameOrObjSpec: string | { [name: string]: Object }, xmldecOrOptions?: XMLDec | XMLCreateOptions, doctypeOrOptions?: XMLDtd | XMLCreateOptions, options?: XMLCreateOptions): XMLElementOrXMLNode;
function begin(): XMLElementOrXMLNode;
}