Table of Contents

Variable: createUser

const createUser: (value: string) => User & {
  all: (parent?: {
     attributes: Record<string, string | undefined> & {
      [qualifiedName: `${string}:${string}`]: string | undefined;
     };
     content: (
        | string
        | {
        kind: "comment";
        value: string;
      }
        | {
        kind: "instruction";
        target: string;
        value: string;
      }
        | {
        attributes: Record<string, ... | ...> & {
         [qualifiedName: `${(...)}:${(...)}`]: ... | ...;
        };
        content: (string | XmlComment | XmlInstruction | GenericElement)[];
        name: string;
        namespaces?: Record<string, string>;
        namespaceURI: string;
        prefix?: string;
     })[];
     name: string;
     namespaces?: Record<string, string>;
     namespaceURI: string;
     prefix?: string;
  }) => User[];
  descendants: (parent?: {
     attributes: Record<string, string | undefined> & {
      [qualifiedName: `${string}:${string}`]: string | undefined;
     };
     content: (
        | string
        | {
        kind: "comment";
        value: string;
      }
        | {
        kind: "instruction";
        target: string;
        value: string;
      }
        | {
        attributes: Record<string, ... | ...> & {
         [qualifiedName: `${(...)}:${(...)}`]: ... | ...;
        };
        content: (string | XmlComment | XmlInstruction | GenericElement)[];
        name: string;
        namespaces?: Record<string, string>;
        namespaceURI: string;
        prefix?: string;
     })[];
     name: string;
     namespaces?: Record<string, string>;
     namespaceURI: string;
     prefix?: string;
  }) => User[];
  elementName: string;
  from: (parent?: {
     attributes: Record<string, string | undefined> & {
      [qualifiedName: `${string}:${string}`]: string | undefined;
     };
     content: (
        | string
        | {
        kind: "comment";
        value: string;
      }
        | {
        kind: "instruction";
        target: string;
        value: string;
      }
        | {
        attributes: Record<string, ... | ...> & {
         [qualifiedName: `${(...)}:${(...)}`]: ... | ...;
        };
        content: (string | XmlComment | XmlInstruction | GenericElement)[];
        name: string;
        namespaces?: Record<string, string>;
        namespaceURI: string;
        prefix?: string;
     })[];
     name: string;
     namespaces?: Record<string, string>;
     namespaceURI: string;
     prefix?: string;
  }) => User | undefined;
  is: (element?: {
     attributes: Record<string, string | undefined> & {
      [qualifiedName: `${string}:${string}`]: string | undefined;
     };
     content: (
        | string
        | {
        kind: "comment";
        value: string;
      }
        | {
        kind: "instruction";
        target: string;
        value: string;
      }
        | {
        attributes: Record<string, ... | ...> & {
         [qualifiedName: `${(...)}:${(...)}`]: ... | ...;
        };
        content: (string | XmlComment | XmlInstruction | GenericElement)[];
        name: string;
        namespaces?: Record<string, string>;
        namespaceURI: string;
        prefix?: string;
     })[];
     name: string;
     namespaces?: Record<string, string>;
     namespaceURI: string;
     prefix?: string;
  }) => element is User;
  namespaceURI: string;
} & {
  read(element?: {
     attributes: Record<string, string | undefined> & {
      [qualifiedName: `${string}:${string}`]: string | undefined;
     };
     content: (
        | string
        | {
        kind: "comment";
        value: string;
      }
        | {
        kind: "instruction";
        target: string;
        value: string;
      }
        | {
        attributes: Record<string, string | undefined> & {
         [qualifiedName: `${string}:${string}`]: string | undefined;
        };
        content: (string | XmlComment | XmlInstruction | GenericElement)[];
        name: string;
        namespaces?: Record<string, string>;
        namespaceURI: string;
        prefix?: string;
     })[];
     name: string;
     namespaces?: Record<string, string>;
     namespaceURI: string;
     prefix?: string;
  }): string | undefined;
};

Create/read the XML User element. Named children follow XSD order and occurrence constraints.

Type Declaration

all

all: (parent?: {
  attributes: Record<string, string | undefined> & {
   [qualifiedName: `${string}:${string}`]: string | undefined;
  };
  content: (
     | string
     | {
     kind: "comment";
     value: string;
   }
     | {
     kind: "instruction";
     target: string;
     value: string;
   }
     | {
     attributes: Record<string, ... | ...> & {
      [qualifiedName: `${(...)}:${(...)}`]: ... | ...;
     };
     content: (string | XmlComment | XmlInstruction | GenericElement)[];
     name: string;
     namespaces?: Record<string, string>;
     namespaceURI: string;
     prefix?: string;
  })[];
  name: string;
  namespaces?: Record<string, string>;
  namespaceURI: string;
  prefix?: string;
}) => User[];

Parameters

parent?
attributes

Record<string, string | undefined> & { [qualifiedName: `${string}:${string}`]: string | undefined; }

content

( | string | { kind: "comment"; value: string; } | { kind: "instruction"; target: string; value: string; } | { attributes: Record<string, ... | ...> & { [qualifiedName: `${(...)}:${(...)}`]: ... | ...; }; content: (string | XmlComment | XmlInstruction | GenericElement)[]; name: string; namespaces?: Record<string, string>; namespaceURI: string; prefix?: string; })[]

name

string

namespaces?

Record<string, string>

namespaceURI

string

prefix?

string

Returns

User[]

descendants

descendants: (parent?: {
  attributes: Record<string, string | undefined> & {
   [qualifiedName: `${string}:${string}`]: string | undefined;
  };
  content: (
     | string
     | {
     kind: "comment";
     value: string;
   }
     | {
     kind: "instruction";
     target: string;
     value: string;
   }
     | {
     attributes: Record<string, ... | ...> & {
      [qualifiedName: `${(...)}:${(...)}`]: ... | ...;
     };
     content: (string | XmlComment | XmlInstruction | GenericElement)[];
     name: string;
     namespaces?: Record<string, string>;
     namespaceURI: string;
     prefix?: string;
  })[];
  name: string;
  namespaces?: Record<string, string>;
  namespaceURI: string;
  prefix?: string;
}) => User[];

Parameters

parent?
attributes

Record<string, string | undefined> & { [qualifiedName: `${string}:${string}`]: string | undefined; }

content

( | string | { kind: "comment"; value: string; } | { kind: "instruction"; target: string; value: string; } | { attributes: Record<string, ... | ...> & { [qualifiedName: `${(...)}:${(...)}`]: ... | ...; }; content: (string | XmlComment | XmlInstruction | GenericElement)[]; name: string; namespaces?: Record<string, string>; namespaceURI: string; prefix?: string; })[]

name

string

namespaces?

Record<string, string>

namespaceURI

string

prefix?

string

Returns

User[]

elementName

elementName: string = definition.name;

from

from: (parent?: {
  attributes: Record<string, string | undefined> & {
   [qualifiedName: `${string}:${string}`]: string | undefined;
  };
  content: (
     | string
     | {
     kind: "comment";
     value: string;
   }
     | {
     kind: "instruction";
     target: string;
     value: string;
   }
     | {
     attributes: Record<string, ... | ...> & {
      [qualifiedName: `${(...)}:${(...)}`]: ... | ...;
     };
     content: (string | XmlComment | XmlInstruction | GenericElement)[];
     name: string;
     namespaces?: Record<string, string>;
     namespaceURI: string;
     prefix?: string;
  })[];
  name: string;
  namespaces?: Record<string, string>;
  namespaceURI: string;
  prefix?: string;
}) => User | undefined;

Parameters

parent?
attributes

Record<string, string | undefined> & { [qualifiedName: `${string}:${string}`]: string | undefined; }

content

( | string | { kind: "comment"; value: string; } | { kind: "instruction"; target: string; value: string; } | { attributes: Record<string, ... | ...> & { [qualifiedName: `${(...)}:${(...)}`]: ... | ...; }; content: (string | XmlComment | XmlInstruction | GenericElement)[]; name: string; namespaces?: Record<string, string>; namespaceURI: string; prefix?: string; })[]

name

string

namespaces?

Record<string, string>

namespaceURI

string

prefix?

string

Returns

User | undefined

is

is: (element?: {
  attributes: Record<string, string | undefined> & {
   [qualifiedName: `${string}:${string}`]: string | undefined;
  };
  content: (
     | string
     | {
     kind: "comment";
     value: string;
   }
     | {
     kind: "instruction";
     target: string;
     value: string;
   }
     | {
     attributes: Record<string, ... | ...> & {
      [qualifiedName: `${(...)}:${(...)}`]: ... | ...;
     };
     content: (string | XmlComment | XmlInstruction | GenericElement)[];
     name: string;
     namespaces?: Record<string, string>;
     namespaceURI: string;
     prefix?: string;
  })[];
  name: string;
  namespaces?: Record<string, string>;
  namespaceURI: string;
  prefix?: string;
}) => element is User;

Parameters

element?
attributes

Record<string, string | undefined> & { [qualifiedName: `${string}:${string}`]: string | undefined; }

content

( | string | { kind: "comment"; value: string; } | { kind: "instruction"; target: string; value: string; } | { attributes: Record<string, ... | ...> & { [qualifiedName: `${(...)}:${(...)}`]: ... | ...; }; content: (string | XmlComment | XmlInstruction | GenericElement)[]; name: string; namespaces?: Record<string, string>; namespaceURI: string; prefix?: string; })[]

name

string

namespaces?

Record<string, string>

namespaceURI

string

prefix?

string

Returns

element is User

namespaceURI

namespaceURI: string = definition.namespaceURI;

read()

read(element?: {
  attributes: Record<string, string | undefined> & {
   [qualifiedName: `${string}:${string}`]: string | undefined;
  };
  content: (
     | string
     | {
     kind: "comment";
     value: string;
   }
     | {
     kind: "instruction";
     target: string;
     value: string;
   }
     | {
     attributes: Record<string, string | undefined> & {
      [qualifiedName: `${string}:${string}`]: string | undefined;
     };
     content: (string | XmlComment | XmlInstruction | GenericElement)[];
     name: string;
     namespaces?: Record<string, string>;
     namespaceURI: string;
     prefix?: string;
  })[];
  name: string;
  namespaces?: Record<string, string>;
  namespaceURI: string;
  prefix?: string;
}): string | undefined;

Parameters

element?
attributes

Record<string, string | undefined> & { [qualifiedName: `${string}:${string}`]: string | undefined; }

content

( | string | { kind: "comment"; value: string; } | { kind: "instruction"; target: string; value: string; } | { attributes: Record<string, string | undefined> & { [qualifiedName: `${string}:${string}`]: string | undefined; }; content: (string | XmlComment | XmlInstruction | GenericElement)[]; name: string; namespaces?: Record<string, string>; namespaceURI: string; prefix?: string; })[]

name

string

namespaces?

Record<string, string>

namespaceURI

string

prefix?

string

Returns

string | undefined