From 82335d1f7667826f5dd75e29a562fb14289afabc Mon Sep 17 00:00:00 2001 From: Matt Pocock Date: Wed, 13 Sep 2023 09:33:50 +0100 Subject: [PATCH] 2023-09-13T08:33:50.649Z --- .../194.5-lib-dom.problem/package.json | 8 ++++++++ .../194.5-lib-dom.problem/src/index.ts | 4 ++++ .../194.5-lib-dom.problem/tsconfig.json | 15 +++++++++++++++ .../194.5-lib-dom.solution/package.json | 8 ++++++++ .../194.5-lib-dom.solution/src/index.ts | 4 ++++ .../194.5-lib-dom.solution/tsconfig.json | 16 ++++++++++++++++ .../194.6-lib-dom-iterable.problem/package.json | 8 ++++++++ .../194.6-lib-dom-iterable.problem/src/index.ts | 5 +++++ .../tsconfig.json | 16 ++++++++++++++++ .../package.json | 8 ++++++++ .../src/index.ts | 5 +++++ .../tsconfig.json | 17 +++++++++++++++++ .../200-lib-dom.problem.ts | 0 .../200-lib-dom.solution.ts | 0 .../201-lib-dom-iterable.problem.ts | 0 .../201-lib-dom-iterable.solution.ts | 0 16 files changed, 114 insertions(+) create mode 100644 src/080-configuring-typescript/194.5-lib-dom.problem/package.json create mode 100644 src/080-configuring-typescript/194.5-lib-dom.problem/src/index.ts create mode 100644 src/080-configuring-typescript/194.5-lib-dom.problem/tsconfig.json create mode 100644 src/080-configuring-typescript/194.5-lib-dom.solution/package.json create mode 100644 src/080-configuring-typescript/194.5-lib-dom.solution/src/index.ts create mode 100644 src/080-configuring-typescript/194.5-lib-dom.solution/tsconfig.json create mode 100644 src/080-configuring-typescript/194.6-lib-dom-iterable.problem/package.json create mode 100644 src/080-configuring-typescript/194.6-lib-dom-iterable.problem/src/index.ts create mode 100644 src/080-configuring-typescript/194.6-lib-dom-iterable.problem/tsconfig.json create mode 100644 src/080-configuring-typescript/194.6-lib-dom-iterable.solution/package.json create mode 100644 src/080-configuring-typescript/194.6-lib-dom-iterable.solution/src/index.ts create mode 100644 src/080-configuring-typescript/194.6-lib-dom-iterable.solution/tsconfig.json delete mode 100644 src/080-configuring-typescript/200-lib-dom.problem.ts delete mode 100644 src/080-configuring-typescript/200-lib-dom.solution.ts delete mode 100644 src/080-configuring-typescript/201-lib-dom-iterable.problem.ts delete mode 100644 src/080-configuring-typescript/201-lib-dom-iterable.solution.ts diff --git a/src/080-configuring-typescript/194.5-lib-dom.problem/package.json b/src/080-configuring-typescript/194.5-lib-dom.problem/package.json new file mode 100644 index 0000000..e11b297 --- /dev/null +++ b/src/080-configuring-typescript/194.5-lib-dom.problem/package.json @@ -0,0 +1,8 @@ +{ + "name": "exercise", + "version": "1.0.0", + "main": "index.js", + "scripts": { + "dev": "tsc --watch" + } +} diff --git a/src/080-configuring-typescript/194.5-lib-dom.problem/src/index.ts b/src/080-configuring-typescript/194.5-lib-dom.problem/src/index.ts new file mode 100644 index 0000000..1608810 --- /dev/null +++ b/src/080-configuring-typescript/194.5-lib-dom.problem/src/index.ts @@ -0,0 +1,4 @@ +document.addEventListener("DOMContentLoaded", () => { + const app = document.querySelector("#app")!; + app.innerHTML = "Hello World!"; +}); diff --git a/src/080-configuring-typescript/194.5-lib-dom.problem/tsconfig.json b/src/080-configuring-typescript/194.5-lib-dom.problem/tsconfig.json new file mode 100644 index 0000000..dee3491 --- /dev/null +++ b/src/080-configuring-typescript/194.5-lib-dom.problem/tsconfig.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "target": "es2020", + "module": "ESNext", + "moduleResolution": "Bundler", + "esModuleInterop": true, + "noEmit": true, + "strict": true, + "skipLibCheck": true, + "isolatedModules": true, + "lib": [ + "ES2020" + ] + }, +} \ No newline at end of file diff --git a/src/080-configuring-typescript/194.5-lib-dom.solution/package.json b/src/080-configuring-typescript/194.5-lib-dom.solution/package.json new file mode 100644 index 0000000..e11b297 --- /dev/null +++ b/src/080-configuring-typescript/194.5-lib-dom.solution/package.json @@ -0,0 +1,8 @@ +{ + "name": "exercise", + "version": "1.0.0", + "main": "index.js", + "scripts": { + "dev": "tsc --watch" + } +} diff --git a/src/080-configuring-typescript/194.5-lib-dom.solution/src/index.ts b/src/080-configuring-typescript/194.5-lib-dom.solution/src/index.ts new file mode 100644 index 0000000..1608810 --- /dev/null +++ b/src/080-configuring-typescript/194.5-lib-dom.solution/src/index.ts @@ -0,0 +1,4 @@ +document.addEventListener("DOMContentLoaded", () => { + const app = document.querySelector("#app")!; + app.innerHTML = "Hello World!"; +}); diff --git a/src/080-configuring-typescript/194.5-lib-dom.solution/tsconfig.json b/src/080-configuring-typescript/194.5-lib-dom.solution/tsconfig.json new file mode 100644 index 0000000..d54701c --- /dev/null +++ b/src/080-configuring-typescript/194.5-lib-dom.solution/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "target": "es2020", + "module": "ESNext", + "moduleResolution": "Bundler", + "esModuleInterop": true, + "noEmit": true, + "strict": true, + "skipLibCheck": true, + "isolatedModules": true, + "lib": [ + "ES2020", + "DOM", + ] + }, +} \ No newline at end of file diff --git a/src/080-configuring-typescript/194.6-lib-dom-iterable.problem/package.json b/src/080-configuring-typescript/194.6-lib-dom-iterable.problem/package.json new file mode 100644 index 0000000..e11b297 --- /dev/null +++ b/src/080-configuring-typescript/194.6-lib-dom-iterable.problem/package.json @@ -0,0 +1,8 @@ +{ + "name": "exercise", + "version": "1.0.0", + "main": "index.js", + "scripts": { + "dev": "tsc --watch" + } +} diff --git a/src/080-configuring-typescript/194.6-lib-dom-iterable.problem/src/index.ts b/src/080-configuring-typescript/194.6-lib-dom-iterable.problem/src/index.ts new file mode 100644 index 0000000..a3ea615 --- /dev/null +++ b/src/080-configuring-typescript/194.6-lib-dom-iterable.problem/src/index.ts @@ -0,0 +1,5 @@ +const elements = document.querySelectorAll("div"); + +for (const element of elements) { + element.innerHTML = "Hello World!"; +} diff --git a/src/080-configuring-typescript/194.6-lib-dom-iterable.problem/tsconfig.json b/src/080-configuring-typescript/194.6-lib-dom-iterable.problem/tsconfig.json new file mode 100644 index 0000000..d54701c --- /dev/null +++ b/src/080-configuring-typescript/194.6-lib-dom-iterable.problem/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "target": "es2020", + "module": "ESNext", + "moduleResolution": "Bundler", + "esModuleInterop": true, + "noEmit": true, + "strict": true, + "skipLibCheck": true, + "isolatedModules": true, + "lib": [ + "ES2020", + "DOM", + ] + }, +} \ No newline at end of file diff --git a/src/080-configuring-typescript/194.6-lib-dom-iterable.solution/package.json b/src/080-configuring-typescript/194.6-lib-dom-iterable.solution/package.json new file mode 100644 index 0000000..e11b297 --- /dev/null +++ b/src/080-configuring-typescript/194.6-lib-dom-iterable.solution/package.json @@ -0,0 +1,8 @@ +{ + "name": "exercise", + "version": "1.0.0", + "main": "index.js", + "scripts": { + "dev": "tsc --watch" + } +} diff --git a/src/080-configuring-typescript/194.6-lib-dom-iterable.solution/src/index.ts b/src/080-configuring-typescript/194.6-lib-dom-iterable.solution/src/index.ts new file mode 100644 index 0000000..a3ea615 --- /dev/null +++ b/src/080-configuring-typescript/194.6-lib-dom-iterable.solution/src/index.ts @@ -0,0 +1,5 @@ +const elements = document.querySelectorAll("div"); + +for (const element of elements) { + element.innerHTML = "Hello World!"; +} diff --git a/src/080-configuring-typescript/194.6-lib-dom-iterable.solution/tsconfig.json b/src/080-configuring-typescript/194.6-lib-dom-iterable.solution/tsconfig.json new file mode 100644 index 0000000..993b03a --- /dev/null +++ b/src/080-configuring-typescript/194.6-lib-dom-iterable.solution/tsconfig.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "target": "es2020", + "module": "ESNext", + "moduleResolution": "Bundler", + "esModuleInterop": true, + "noEmit": true, + "strict": true, + "skipLibCheck": true, + "isolatedModules": true, + "lib": [ + "ES2020", + "DOM", + "DOM.Iterable" + ] + }, +} \ No newline at end of file diff --git a/src/080-configuring-typescript/200-lib-dom.problem.ts b/src/080-configuring-typescript/200-lib-dom.problem.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/080-configuring-typescript/200-lib-dom.solution.ts b/src/080-configuring-typescript/200-lib-dom.solution.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/080-configuring-typescript/201-lib-dom-iterable.problem.ts b/src/080-configuring-typescript/201-lib-dom-iterable.problem.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/080-configuring-typescript/201-lib-dom-iterable.solution.ts b/src/080-configuring-typescript/201-lib-dom-iterable.solution.ts deleted file mode 100644 index e69de29..0000000