```ts
export function drawTreeLines(root: object): string[] {
  if (typeof root !== 'object' || root === null) {
    throw new Error('Root must be a non-null object');
  }

  const lines: string[] = [];

  function traverse(node: any, depth: number, isLast: boolean) {
    if (typeof node.name !== 'string' || !node.name.trim() || node.name.includes('\n')) {
      throw new Error('Node name must be a non-empty string without newlines');
    }
    if (!Array.isArray(node.children)) {
      throw new Error('Children must be an array');
    }

    const indent = ' '.repeat(depth * 4);
    const connector = isLast ? "'-- " : "|-- ";
    lines.push(`${indent}${connector}${node.name}`);

    node.children.forEach((child: any, index: number) => {
      traverse(child, depth + 1, index === node.children.length - 1);
    });
  }

  traverse(root, 0, true);
  return lines;
}
```