Issue 1:
import { x, y } from "./alphabet.ts"
import { foo, bar } from "std/foo/bar.ts"
import { z } from "./blah.ts"

imo would look better as

import { x, y } from "./alphabet.ts"
import { z } from "./blah.ts"
import { foo, bar } from "std/foo/bar.ts"

Issue 2:
When I run bundle with Deno, I get an error and can't create a Javascript file.

The target code.

/// <reference lib="dom" />

class ClickLogger {
constructor() {
document.addEventListener('click', this.eventListener);
}

eventListener(e: Event) {
const phase = e.eventPhase;
const tag = (<HTMLElement>e.target)
console.log(`Click event in phase ${phase} detected on element ${tag} by ClickLogger`);
}

}

tsconfig.js

{
"compilerOptions": {
"plugins": [
{
"name": "typescript-deno-plugin"
}
]
}
}

The executed command.

deno bundle input.ts output.js

The error that occurred.

Bundle file:///Users/nabezokodaikon/workspace/develop-private/learning-typescript/chapter04/List04_13.ts
error: TS6200 [ERROR]: Definitions of the following identifiers conflict with those in another file: ImportExportKind, Module, Instance, Memory, TableKind, Table, ValueType, Global, CompileError, LinkError, RuntimeError, ReadableStreamReadResult, CountQueuingStrategy, ByteLengthQueuingStrategy, WritableStream, TransformStream, DOMException, BufferSource, BlobPart, Blob, File, FormDataEntryValue, FormData, HeadersInit, Headers, RequestInfo, RequestCache, RequestCredentials, RequestMode, RequestRedirect, ReferrerPolicy, BodyInit, RequestDestination, Request, ResponseType, Response, TextDecoder, TextEncoder, URLSearchParams, URL, MessageEvent, ErrorEvent, Worker, PerformanceEntryList, Performance, performance, PerformanceEntry, PerformanceMark, PerformanceMeasure, Event, EventTarget, EventListenerOrEventListenerObject, CustomEvent, AbortController, AbortSignal
declare namespace WebAssembly {
~~~~~~~
at asset:///lib.deno.shared_globals.d.ts:10:1

Conflicts are in this file.
interface Account {
~~~~~~~~~
at asset:///lib.dom.d.ts:25:1

TS2717 [ERROR]: Subsequent property declarations must have the same type. Property 'byobRequest' must be of type 'ReadableStreamBYOBRequest | undefined', but here has type 'undefined'.
readonly byobRequest: undefined;
~~~~~~~~~~~
at asset:///lib.deno.shared_globals.d.ts:346:12

'byobRequest' was also declared here.
readonly byobRequest: ReadableStreamBYOBRequest | undefined;
~~~~~~~~~~~
at asset:///lib.dom.d.ts:12477:14

TS2375 [ERROR]: Duplicate number index signature.
[index: number]: string;
~~~~~~~~~~~~~~~~~~~~~~~~
at asset:///lib.deno.shared_globals.d.ts:529:3

TS2717 [ERROR]: Subsequent property declarations must have the same type. Property 'log' must be of type '(...data: any[]) => void', but here has type '(...args: unknown[]) => void'.
log: (...args: unknown[]) => void;
~~~
at asset:///lib.deno.shared_globals.d.ts:583:3

'log' was also declared here.
log(...data: any[]): void;
~~~~~~~~~~~~~~~~~~~~~~~~~~
at asset:///lib.dom.d.ts:18948:5

TS2717 [ERROR]: Subsequent property declarations must have the same type. Property 'debug' must be of type '(...data: any[]) => void', but here has type '(...args: unknown[]) => void'.
debug: (...args: unknown[]) => void;
~~~~~
at asset:///lib.deno.shared_globals.d.ts:585:3

'debug' was also declared here.
debug(...data: any[]): void;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
at asset:///lib.dom.d.ts:18939:5

TS2717 [ERROR]: Subsequent property declarations must have the same type. Property 'info' must be of type '(...data: any[]) => void', but here has type '(...args: unknown[]) => void'.
info: (...args: unknown[]) => void;
~~~~
at asset:///lib.deno.shared_globals.d.ts:587:3

'info' was also declared here.
info(...data: any[]): void;
~~~~~~~~~~~~~~~~~~~~~~~~~~~
at asset:///lib.dom.d.ts:18947:5

TS2717 [ERROR]: Subsequent property declarations must have the same type. Property 'dir' must be of type '(item?: any, options?: any) => void', but here has type '(obj: unknown, options?: Partial<{ depth: number; indentLevel: number; }> | undefined) => void'.
dir: (
~~~
at asset:///lib.deno.shared_globals.d.ts:589:3

'dir' was also declared here.
dir(item?: any, options?: any): void;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
at asset:///lib.dom.d.ts:18940:5

TS2717 [ERROR]: Subsequent property declarations must have the same type. Property 'dirxml' must be of type '(...data: any[]) => void', but here has type '(obj: unknown, options?: Partial<{ showHidden: boolean; depth: number; colors: boolean; indentLevel: number; }> | undefined) => void'.
dirxml: (
~~~~~~
at asset:///lib.deno.shared_globals.d.ts:607:3

'dirxml' was also declared here.
dirxml(...data: any[]): void;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
at asset:///lib.dom.d.ts:18941:5

TS2717 [ERROR]: Subsequent property declarations must have the same type. Property 'warn' must be of type '(...data: any[]) => void', but here has type '(...args: unknown[]) => void'.
warn: (...args: unknown[]) => void;
~~~~
at asset:///lib.deno.shared_globals.d.ts:618:3

'warn' was also declared here.
warn(...data: any[]): void;
~~~~~~~~~~~~~~~~~~~~~~~~~~~
at asset:///lib.dom.d.ts:18955:5

TS2717 [ERROR]: Subsequent property declarations must have the same type. Property 'error' must be of type '(...data: any[]) => void', but here has type '(...args: unknown[]) => void'.
error: (...args: unknown[]) => void;
~~~~~
at asset:///lib.deno.shared_globals.d.ts:620:3

'error' was also declared here.
error(...data: any[]): void;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
at asset:///lib.dom.d.ts:18942:5

TS2717 [ERROR]: Subsequent property declarations must have the same type. Property 'assert' must be of type '(condition?: boolean | undefined, ...data: any[]) => void', but here has type '(condition?: boolean | undefined, ...args: unknown[]) => void'.
assert: (condition?: boolean, ...args: unknown[]) => void;
~~~~~~
at asset:///lib.deno.shared_globals.d.ts:626:3

'assert' was also declared here.
assert(condition?: boolean, ...data: any[]): void;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
at asset:///lib.dom.d.ts:18935:5

TS2717 [ERROR]: Subsequent property declarations must have the same type. Property 'table' must be of type '(tabularData?: any, properties?: string[] | undefined) => void', but here has type '(data: unknown, properties?: string[] | undefined) => void'.
table: (data: unknown, properties?: string[] | undefined) => void;
~~~~~
at asset:///lib.deno.shared_globals.d.ts:629:3

'table' was also declared here.
table(tabularData?: any, properties?: string[]): void;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
at asset:///lib.dom.d.ts:18949:5

TS2717 [ERROR]: Subsequent property declarations must have the same type. Property 'timeLog' must be of type '(label?: string | undefined, ...data: any[]) => void', but here has type '(label?: string | undefined, ...args: unknown[]) => void'.
timeLog: (label?: string, ...args: unknown[]) => void;
~~~~~~~
at asset:///lib.deno.shared_globals.d.ts:631:3

'timeLog' was also declared here.
timeLog(label?: string, ...data: any[]): void;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
at asset:///lib.dom.d.ts:18952:5

TS2717 [ERROR]: Subsequent property declarations must have the same type. Property 'group' must be of type '(...data: any[]) => void', but here has type '(...label: unknown[]) => void'.
group: (...label: unknown[]) => void;
~~~~~
at asset:///lib.deno.shared_globals.d.ts:633:3

'group' was also declared here.
group(...data: any[]): void;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
at asset:///lib.dom.d.ts:18944:5

TS2717 [ERROR]: Subsequent property declarations must have the same type. Property 'groupCollapsed' must be of type '(...data: any[]) => void', but here has type '(...label: unknown[]) => void'.
groupCollapsed: (...label: unknown[]) => void;
~~~~~~~~~~~~~~
at asset:///lib.deno.shared_globals.d.ts:634:3

'groupCollapsed' was also declared here.
groupCollapsed(...data: any[]): void;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
at asset:///lib.dom.d.ts:18945:5

TS2717 [ERROR]: Subsequent property declarations must have the same type. Property 'trace' must be of type '(...data: any[]) => void', but here has type '(...args: unknown[]) => void'.
trace: (...args: unknown[]) => void;
~~~~~
at asset:///lib.deno.shared_globals.d.ts:637:3

'trace' was also declared here.
trace(...data: any[]): void;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
at asset:///lib.dom.d.ts:18954:5

TS2717 [ERROR]: Subsequent property declarations must have the same type. Property 'subtle' must be of type 'SubtleCrypto', but here has type 'null'.
readonly subtle: null;
~~~~~~
at asset:///lib.deno.shared_globals.d.ts:642:12

'subtle' was also declared here.
readonly subtle: SubtleCrypto;
~~~~~~
at asset:///lib.dom.d.ts:3684:14

TS2451 [ERROR]: Cannot redeclare block-scoped variable 'window'.
declare const window: Window & typeof globalThis;
~~~~~~
at asset:///lib.deno.window.d.ts:20:15

'window' was also declared here.
declare var window: Window & typeof globalThis;
~~~~~~
at asset:///lib.dom.d.ts:19505:13

TS2451 [ERROR]: Cannot redeclare block-scoped variable 'self'.
declare const self: Window & typeof globalThis;
~~~~
at asset:///lib.deno.window.d.ts:21:15

'self' was also declared here.
declare var self: Window & typeof globalThis;
~~~~
at asset:///lib.dom.d.ts:19498:13

TS2451 [ERROR]: Cannot redeclare block-scoped variable 'onload'.
declare const onload: ((this: Window, ev: Event) => any) | null;
~~~~~~
at asset:///lib.deno.window.d.ts:22:15

'onload' was also declared here.
declare var onload: ((this: Window, ev: Event) => any) | null;
~~~~~~
at asset:///lib.dom.d.ts:19670:13

TS2451 [ERROR]: Cannot redeclare block-scoped variable 'onunload'.
declare const onunload: ((this: Window, ev: Event) => any) | null;
~~~~~~~~
at asset:///lib.deno.window.d.ts:23:15

'onunload' was also declared here.
declare var onunload: ((this: Window, ev: Event) => any) | null;
~~~~~~~~
at asset:///lib.dom.d.ts:19845:13

TS6200 [ERROR]: Definitions of the following identifiers conflict with those in another file: ImportExportKind, Module, Instance, Memory, TableKind, Table, ValueType, Global, CompileError, LinkError, RuntimeError, ReadableStreamReadResult, CountQueuingStrategy, ByteLengthQueuingStrategy, WritableStream, TransformStream, DOMException, BufferSource, BlobPart, Blob, File, FormDataEntryValue, FormData, HeadersInit, Headers, RequestInfo, RequestCache, RequestCredentials, RequestMode, RequestRedirect, ReferrerPolicy, BodyInit, RequestDestination, Request, ResponseType, Response, TextDecoder, TextEncoder, URLSearchParams, URL, MessageEvent, ErrorEvent, Worker, PerformanceEntryList, Performance, performance, PerformanceEntry, PerformanceMark, PerformanceMeasure, Event, EventTarget, EventListenerOrEventListenerObject, CustomEvent, AbortController, AbortSignal
interface Account {
~~~~~~~~~
at asset:///lib.dom.d.ts:25:1

Conflicts are in this file.
declare namespace WebAssembly {
~~~~~~~
at asset:///lib.deno.shared_globals.d.ts:10:1

TS2430 [ERROR]: Interface 'Window' incorrectly extends interface 'GlobalEventHandlers'.
Types of property 'onload' are incompatible.
Type '((this: Window, ev: Event) => any) | null' is not assignable to type '((this: GlobalEventHandlers, ev: Event) => any) | null'.
Type '(this: Window, ev: Event) => any' is not assignable to type '(this: GlobalEventHandlers, ev: Event) => any'.
The 'this' types of each signature are incompatible.
Type 'GlobalEventHandlers' is missing the following properties from type 'Window': applicationCache, clientInformation, closed, customElements, and 141 more.
at asset:///lib.dom.d.ts:18394:11

TS2430 [ERROR]: Interface 'Window' incorrectly extends interface 'WindowEventHandlers'.
Types of property 'onunload' are incompatible.
Type '((this: Window, ev: Event) => any) | null' is not assignable to type '((this: WindowEventHandlers, ev: Event) => any) | null'.
Type '(this: Window, ev: Event) => any' is not assignable to type '(this: WindowEventHandlers, ev: Event) => any'.
The 'this' types of each signature are incompatible.
Type 'WindowEventHandlers' is missing the following properties from type 'Window': applicationCache, clientInformation, closed, customElements, and 206 more.
at asset:///lib.dom.d.ts:18394:11

TS2451 [ERROR]: Cannot redeclare block-scoped variable 'self'.
declare var self: Window & typeof globalThis;
~~~~
at asset:///lib.dom.d.ts:19498:13

'self' was also declared here.
declare const self: Window & typeof globalThis;
~~~~
at asset:///lib.deno.window.d.ts:21:15

TS2451 [ERROR]: Cannot redeclare block-scoped variable 'window'.
declare var window: Window & typeof globalThis;
~~~~~~
at asset:///lib.dom.d.ts:19505:13

'window' was also declared here.
declare const window: Window & typeof globalThis;
~~~~~~
at asset:///lib.deno.window.d.ts:20:15

TS2451 [ERROR]: Cannot redeclare block-scoped variable 'onload'.
declare var onload: ((this: Window, ev: Event) => any) | null;
~~~~~~
at asset:///lib.dom.d.ts:19670:13

'onload' was also declared here.
declare const onload: ((this: Window, ev: Event) => any) | null;
~~~~~~
at asset:///lib.deno.window.d.ts:22:15

TS2451 [ERROR]: Cannot redeclare block-scoped variable 'onunload'.
declare var onunload: ((this: Window, ev: Event) => any) | null;
~~~~~~~~
at asset:///lib.dom.d.ts:19845:13

'onunload' was also declared here.
declare const onunload: ((this: Window, ev: Event) => any) | null;
~~~~~~~~
at asset:///lib.deno.window.d.ts:23:15

Found 28 errors.

How can I bundle it?