From de2803b6c5d5d2ec805b4612937a03110364de0e Mon Sep 17 00:00:00 2001 From: Matt Pocock Date: Tue, 19 Sep 2023 10:47:17 +0100 Subject: [PATCH] 2023-09-19T09:47:17.618Z --- .../package.json | 0 .../pnpm-lock.yaml | 0 .../src-2/otherFile.ts | 0 .../src/index.ts | 0 .../tsconfig.json | 0 .../package.json | 0 .../pnpm-lock.yaml | 0 .../src-2/otherFile.ts | 0 .../src/index.ts | 0 .../tsconfig.json | 0 .../197-jsx.problem.ts | 0 .../197-jsx.solution.ts | 0 .../package.json | 0 .../pnpm-lock.yaml | 0 .../src-2/otherFile.ts | 0 .../src/index.ts | 0 .../tsconfig.json | 0 .../package.json | 0 .../pnpm-lock.yaml | 0 .../src-2/otherFile.ts | 0 .../src/index.ts | 0 .../tsconfig.json | 0 .../199-jsx.problem/package.json | 9 +++++++++ .../199-jsx.problem/pnpm-lock.yaml | 5 +++++ .../199-jsx.problem/src/index.tsx | 3 +++ .../199-jsx.problem/tsconfig.json | 15 +++++++++++++++ .../199-jsx.solution.1/package.json | 9 +++++++++ .../199-jsx.solution.1/pnpm-lock.yaml | 5 +++++ .../199-jsx.solution.1/src/index.tsx | 3 +++ .../199-jsx.solution.1/tsconfig.json | 16 ++++++++++++++++ .../199-jsx.solution.2/package.json | 9 +++++++++ .../199-jsx.solution.2/pnpm-lock.yaml | 5 +++++ .../199-jsx.solution.2/src/index.tsx | 3 +++ .../199-jsx.solution.2/tsconfig.json | 16 ++++++++++++++++ ...-set-up-types-for-simple-scripts.explainer.ts | 1 + ...01-set-up-types-for-simple-scripts.problem.ts | 0 ...1-set-up-types-for-simple-scripts.solution.ts | 0 .../202-set-up-types-for-test-files.explainer.ts | 1 + .../202-set-up-types-for-test-files.problem.ts | 0 .../202-set-up-types-for-test-files.solution.ts | 0 ...set-up-types-for-bundled-web-app.explainer.ts | 1 + ...3-set-up-types-for-bundled-web-app.problem.ts | 0 ...-set-up-types-for-bundled-web-app.solution.ts | 0 43 files changed, 101 insertions(+) rename src/080-configuring-typescript/{198-creating-declaration-files.problem => 197-creating-declaration-files.problem}/package.json (100%) rename src/080-configuring-typescript/{198-creating-declaration-files.problem => 197-creating-declaration-files.problem}/pnpm-lock.yaml (100%) rename src/080-configuring-typescript/{198-creating-declaration-files.problem => 197-creating-declaration-files.problem}/src-2/otherFile.ts (100%) rename src/080-configuring-typescript/{198-creating-declaration-files.problem => 197-creating-declaration-files.problem}/src/index.ts (100%) rename src/080-configuring-typescript/{198-creating-declaration-files.problem => 197-creating-declaration-files.problem}/tsconfig.json (100%) rename src/080-configuring-typescript/{198-creating-declaration-files.solution => 197-creating-declaration-files.solution}/package.json (100%) rename src/080-configuring-typescript/{198-creating-declaration-files.solution => 197-creating-declaration-files.solution}/pnpm-lock.yaml (100%) rename src/080-configuring-typescript/{198-creating-declaration-files.solution => 197-creating-declaration-files.solution}/src-2/otherFile.ts (100%) rename src/080-configuring-typescript/{198-creating-declaration-files.solution => 197-creating-declaration-files.solution}/src/index.ts (100%) rename src/080-configuring-typescript/{198-creating-declaration-files.solution => 197-creating-declaration-files.solution}/tsconfig.json (100%) delete mode 100644 src/080-configuring-typescript/197-jsx.problem.ts delete mode 100644 src/080-configuring-typescript/197-jsx.solution.ts rename src/080-configuring-typescript/{199-declaration-maps.problem => 198-declaration-maps.problem}/package.json (100%) rename src/080-configuring-typescript/{199-declaration-maps.problem => 198-declaration-maps.problem}/pnpm-lock.yaml (100%) rename src/080-configuring-typescript/{199-declaration-maps.problem => 198-declaration-maps.problem}/src-2/otherFile.ts (100%) rename src/080-configuring-typescript/{199-declaration-maps.problem => 198-declaration-maps.problem}/src/index.ts (100%) rename src/080-configuring-typescript/{199-declaration-maps.problem => 198-declaration-maps.problem}/tsconfig.json (100%) rename src/080-configuring-typescript/{199-declaration-maps.solution => 198-declaration-maps.solution}/package.json (100%) rename src/080-configuring-typescript/{199-declaration-maps.solution => 198-declaration-maps.solution}/pnpm-lock.yaml (100%) rename src/080-configuring-typescript/{199-declaration-maps.solution => 198-declaration-maps.solution}/src-2/otherFile.ts (100%) rename src/080-configuring-typescript/{199-declaration-maps.solution => 198-declaration-maps.solution}/src/index.ts (100%) rename src/080-configuring-typescript/{199-declaration-maps.solution => 198-declaration-maps.solution}/tsconfig.json (100%) create mode 100644 src/080-configuring-typescript/199-jsx.problem/package.json create mode 100644 src/080-configuring-typescript/199-jsx.problem/pnpm-lock.yaml create mode 100644 src/080-configuring-typescript/199-jsx.problem/src/index.tsx create mode 100644 src/080-configuring-typescript/199-jsx.problem/tsconfig.json create mode 100644 src/080-configuring-typescript/199-jsx.solution.1/package.json create mode 100644 src/080-configuring-typescript/199-jsx.solution.1/pnpm-lock.yaml create mode 100644 src/080-configuring-typescript/199-jsx.solution.1/src/index.tsx create mode 100644 src/080-configuring-typescript/199-jsx.solution.1/tsconfig.json create mode 100644 src/080-configuring-typescript/199-jsx.solution.2/package.json create mode 100644 src/080-configuring-typescript/199-jsx.solution.2/pnpm-lock.yaml create mode 100644 src/080-configuring-typescript/199-jsx.solution.2/src/index.tsx create mode 100644 src/080-configuring-typescript/199-jsx.solution.2/tsconfig.json create mode 100644 src/080-configuring-typescript/201-set-up-types-for-simple-scripts.explainer.ts delete mode 100644 src/080-configuring-typescript/201-set-up-types-for-simple-scripts.problem.ts delete mode 100644 src/080-configuring-typescript/201-set-up-types-for-simple-scripts.solution.ts create mode 100644 src/080-configuring-typescript/202-set-up-types-for-test-files.explainer.ts delete mode 100644 src/080-configuring-typescript/202-set-up-types-for-test-files.problem.ts delete mode 100644 src/080-configuring-typescript/202-set-up-types-for-test-files.solution.ts create mode 100644 src/080-configuring-typescript/203-set-up-types-for-bundled-web-app.explainer.ts delete mode 100644 src/080-configuring-typescript/203-set-up-types-for-bundled-web-app.problem.ts delete mode 100644 src/080-configuring-typescript/203-set-up-types-for-bundled-web-app.solution.ts diff --git a/src/080-configuring-typescript/198-creating-declaration-files.problem/package.json b/src/080-configuring-typescript/197-creating-declaration-files.problem/package.json similarity index 100% rename from src/080-configuring-typescript/198-creating-declaration-files.problem/package.json rename to src/080-configuring-typescript/197-creating-declaration-files.problem/package.json diff --git a/src/080-configuring-typescript/198-creating-declaration-files.problem/pnpm-lock.yaml b/src/080-configuring-typescript/197-creating-declaration-files.problem/pnpm-lock.yaml similarity index 100% rename from src/080-configuring-typescript/198-creating-declaration-files.problem/pnpm-lock.yaml rename to src/080-configuring-typescript/197-creating-declaration-files.problem/pnpm-lock.yaml diff --git a/src/080-configuring-typescript/198-creating-declaration-files.problem/src-2/otherFile.ts b/src/080-configuring-typescript/197-creating-declaration-files.problem/src-2/otherFile.ts similarity index 100% rename from src/080-configuring-typescript/198-creating-declaration-files.problem/src-2/otherFile.ts rename to src/080-configuring-typescript/197-creating-declaration-files.problem/src-2/otherFile.ts diff --git a/src/080-configuring-typescript/198-creating-declaration-files.problem/src/index.ts b/src/080-configuring-typescript/197-creating-declaration-files.problem/src/index.ts similarity index 100% rename from src/080-configuring-typescript/198-creating-declaration-files.problem/src/index.ts rename to src/080-configuring-typescript/197-creating-declaration-files.problem/src/index.ts diff --git a/src/080-configuring-typescript/198-creating-declaration-files.problem/tsconfig.json b/src/080-configuring-typescript/197-creating-declaration-files.problem/tsconfig.json similarity index 100% rename from src/080-configuring-typescript/198-creating-declaration-files.problem/tsconfig.json rename to src/080-configuring-typescript/197-creating-declaration-files.problem/tsconfig.json diff --git a/src/080-configuring-typescript/198-creating-declaration-files.solution/package.json b/src/080-configuring-typescript/197-creating-declaration-files.solution/package.json similarity index 100% rename from src/080-configuring-typescript/198-creating-declaration-files.solution/package.json rename to src/080-configuring-typescript/197-creating-declaration-files.solution/package.json diff --git a/src/080-configuring-typescript/198-creating-declaration-files.solution/pnpm-lock.yaml b/src/080-configuring-typescript/197-creating-declaration-files.solution/pnpm-lock.yaml similarity index 100% rename from src/080-configuring-typescript/198-creating-declaration-files.solution/pnpm-lock.yaml rename to src/080-configuring-typescript/197-creating-declaration-files.solution/pnpm-lock.yaml diff --git a/src/080-configuring-typescript/198-creating-declaration-files.solution/src-2/otherFile.ts b/src/080-configuring-typescript/197-creating-declaration-files.solution/src-2/otherFile.ts similarity index 100% rename from src/080-configuring-typescript/198-creating-declaration-files.solution/src-2/otherFile.ts rename to src/080-configuring-typescript/197-creating-declaration-files.solution/src-2/otherFile.ts diff --git a/src/080-configuring-typescript/198-creating-declaration-files.solution/src/index.ts b/src/080-configuring-typescript/197-creating-declaration-files.solution/src/index.ts similarity index 100% rename from src/080-configuring-typescript/198-creating-declaration-files.solution/src/index.ts rename to src/080-configuring-typescript/197-creating-declaration-files.solution/src/index.ts diff --git a/src/080-configuring-typescript/198-creating-declaration-files.solution/tsconfig.json b/src/080-configuring-typescript/197-creating-declaration-files.solution/tsconfig.json similarity index 100% rename from src/080-configuring-typescript/198-creating-declaration-files.solution/tsconfig.json rename to src/080-configuring-typescript/197-creating-declaration-files.solution/tsconfig.json diff --git a/src/080-configuring-typescript/197-jsx.problem.ts b/src/080-configuring-typescript/197-jsx.problem.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/080-configuring-typescript/197-jsx.solution.ts b/src/080-configuring-typescript/197-jsx.solution.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/080-configuring-typescript/199-declaration-maps.problem/package.json b/src/080-configuring-typescript/198-declaration-maps.problem/package.json similarity index 100% rename from src/080-configuring-typescript/199-declaration-maps.problem/package.json rename to src/080-configuring-typescript/198-declaration-maps.problem/package.json diff --git a/src/080-configuring-typescript/199-declaration-maps.problem/pnpm-lock.yaml b/src/080-configuring-typescript/198-declaration-maps.problem/pnpm-lock.yaml similarity index 100% rename from src/080-configuring-typescript/199-declaration-maps.problem/pnpm-lock.yaml rename to src/080-configuring-typescript/198-declaration-maps.problem/pnpm-lock.yaml diff --git a/src/080-configuring-typescript/199-declaration-maps.problem/src-2/otherFile.ts b/src/080-configuring-typescript/198-declaration-maps.problem/src-2/otherFile.ts similarity index 100% rename from src/080-configuring-typescript/199-declaration-maps.problem/src-2/otherFile.ts rename to src/080-configuring-typescript/198-declaration-maps.problem/src-2/otherFile.ts diff --git a/src/080-configuring-typescript/199-declaration-maps.problem/src/index.ts b/src/080-configuring-typescript/198-declaration-maps.problem/src/index.ts similarity index 100% rename from src/080-configuring-typescript/199-declaration-maps.problem/src/index.ts rename to src/080-configuring-typescript/198-declaration-maps.problem/src/index.ts diff --git a/src/080-configuring-typescript/199-declaration-maps.problem/tsconfig.json b/src/080-configuring-typescript/198-declaration-maps.problem/tsconfig.json similarity index 100% rename from src/080-configuring-typescript/199-declaration-maps.problem/tsconfig.json rename to src/080-configuring-typescript/198-declaration-maps.problem/tsconfig.json diff --git a/src/080-configuring-typescript/199-declaration-maps.solution/package.json b/src/080-configuring-typescript/198-declaration-maps.solution/package.json similarity index 100% rename from src/080-configuring-typescript/199-declaration-maps.solution/package.json rename to src/080-configuring-typescript/198-declaration-maps.solution/package.json diff --git a/src/080-configuring-typescript/199-declaration-maps.solution/pnpm-lock.yaml b/src/080-configuring-typescript/198-declaration-maps.solution/pnpm-lock.yaml similarity index 100% rename from src/080-configuring-typescript/199-declaration-maps.solution/pnpm-lock.yaml rename to src/080-configuring-typescript/198-declaration-maps.solution/pnpm-lock.yaml diff --git a/src/080-configuring-typescript/199-declaration-maps.solution/src-2/otherFile.ts b/src/080-configuring-typescript/198-declaration-maps.solution/src-2/otherFile.ts similarity index 100% rename from src/080-configuring-typescript/199-declaration-maps.solution/src-2/otherFile.ts rename to src/080-configuring-typescript/198-declaration-maps.solution/src-2/otherFile.ts diff --git a/src/080-configuring-typescript/199-declaration-maps.solution/src/index.ts b/src/080-configuring-typescript/198-declaration-maps.solution/src/index.ts similarity index 100% rename from src/080-configuring-typescript/199-declaration-maps.solution/src/index.ts rename to src/080-configuring-typescript/198-declaration-maps.solution/src/index.ts diff --git a/src/080-configuring-typescript/199-declaration-maps.solution/tsconfig.json b/src/080-configuring-typescript/198-declaration-maps.solution/tsconfig.json similarity index 100% rename from src/080-configuring-typescript/199-declaration-maps.solution/tsconfig.json rename to src/080-configuring-typescript/198-declaration-maps.solution/tsconfig.json diff --git a/src/080-configuring-typescript/199-jsx.problem/package.json b/src/080-configuring-typescript/199-jsx.problem/package.json new file mode 100644 index 0000000..e93efae --- /dev/null +++ b/src/080-configuring-typescript/199-jsx.problem/package.json @@ -0,0 +1,9 @@ +{ + "name": "exercise", + "version": "1.0.0", + "main": "index.js", + "type": "module", + "scripts": { + "dev": "tsc --watch" + } +} diff --git a/src/080-configuring-typescript/199-jsx.problem/pnpm-lock.yaml b/src/080-configuring-typescript/199-jsx.problem/pnpm-lock.yaml new file mode 100644 index 0000000..2b9f188 --- /dev/null +++ b/src/080-configuring-typescript/199-jsx.problem/pnpm-lock.yaml @@ -0,0 +1,5 @@ +lockfileVersion: '6.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false diff --git a/src/080-configuring-typescript/199-jsx.problem/src/index.tsx b/src/080-configuring-typescript/199-jsx.problem/src/index.tsx new file mode 100644 index 0000000..6ffd30a --- /dev/null +++ b/src/080-configuring-typescript/199-jsx.problem/src/index.tsx @@ -0,0 +1,3 @@ +const MyComponent = () => { + return
; +}; diff --git a/src/080-configuring-typescript/199-jsx.problem/tsconfig.json b/src/080-configuring-typescript/199-jsx.problem/tsconfig.json new file mode 100644 index 0000000..6670f99 --- /dev/null +++ b/src/080-configuring-typescript/199-jsx.problem/tsconfig.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "target": "ES2022", + "module": "NodeNext", + "moduleResolution": "NodeNext", + "esModuleInterop": true, + "outDir": "dist", + "rootDir": "src", + "strict": true, + "skipLibCheck": true, + "isolatedModules": true, + "moduleDetection": "force", + "verbatimModuleSyntax": true + }, +} \ No newline at end of file diff --git a/src/080-configuring-typescript/199-jsx.solution.1/package.json b/src/080-configuring-typescript/199-jsx.solution.1/package.json new file mode 100644 index 0000000..e93efae --- /dev/null +++ b/src/080-configuring-typescript/199-jsx.solution.1/package.json @@ -0,0 +1,9 @@ +{ + "name": "exercise", + "version": "1.0.0", + "main": "index.js", + "type": "module", + "scripts": { + "dev": "tsc --watch" + } +} diff --git a/src/080-configuring-typescript/199-jsx.solution.1/pnpm-lock.yaml b/src/080-configuring-typescript/199-jsx.solution.1/pnpm-lock.yaml new file mode 100644 index 0000000..2b9f188 --- /dev/null +++ b/src/080-configuring-typescript/199-jsx.solution.1/pnpm-lock.yaml @@ -0,0 +1,5 @@ +lockfileVersion: '6.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false diff --git a/src/080-configuring-typescript/199-jsx.solution.1/src/index.tsx b/src/080-configuring-typescript/199-jsx.solution.1/src/index.tsx new file mode 100644 index 0000000..6ffd30a --- /dev/null +++ b/src/080-configuring-typescript/199-jsx.solution.1/src/index.tsx @@ -0,0 +1,3 @@ +const MyComponent = () => { + return
; +}; diff --git a/src/080-configuring-typescript/199-jsx.solution.1/tsconfig.json b/src/080-configuring-typescript/199-jsx.solution.1/tsconfig.json new file mode 100644 index 0000000..e1ff50f --- /dev/null +++ b/src/080-configuring-typescript/199-jsx.solution.1/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "target": "ES2022", + "module": "NodeNext", + "moduleResolution": "NodeNext", + "esModuleInterop": true, + "outDir": "dist", + "rootDir": "src", + "strict": true, + "skipLibCheck": true, + "isolatedModules": true, + "moduleDetection": "force", + "verbatimModuleSyntax": true, + "jsx": "preserve" + }, +} \ No newline at end of file diff --git a/src/080-configuring-typescript/199-jsx.solution.2/package.json b/src/080-configuring-typescript/199-jsx.solution.2/package.json new file mode 100644 index 0000000..e93efae --- /dev/null +++ b/src/080-configuring-typescript/199-jsx.solution.2/package.json @@ -0,0 +1,9 @@ +{ + "name": "exercise", + "version": "1.0.0", + "main": "index.js", + "type": "module", + "scripts": { + "dev": "tsc --watch" + } +} diff --git a/src/080-configuring-typescript/199-jsx.solution.2/pnpm-lock.yaml b/src/080-configuring-typescript/199-jsx.solution.2/pnpm-lock.yaml new file mode 100644 index 0000000..2b9f188 --- /dev/null +++ b/src/080-configuring-typescript/199-jsx.solution.2/pnpm-lock.yaml @@ -0,0 +1,5 @@ +lockfileVersion: '6.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false diff --git a/src/080-configuring-typescript/199-jsx.solution.2/src/index.tsx b/src/080-configuring-typescript/199-jsx.solution.2/src/index.tsx new file mode 100644 index 0000000..6ffd30a --- /dev/null +++ b/src/080-configuring-typescript/199-jsx.solution.2/src/index.tsx @@ -0,0 +1,3 @@ +const MyComponent = () => { + return
; +}; diff --git a/src/080-configuring-typescript/199-jsx.solution.2/tsconfig.json b/src/080-configuring-typescript/199-jsx.solution.2/tsconfig.json new file mode 100644 index 0000000..3646681 --- /dev/null +++ b/src/080-configuring-typescript/199-jsx.solution.2/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "target": "ES2022", + "module": "NodeNext", + "moduleResolution": "NodeNext", + "esModuleInterop": true, + "outDir": "dist", + "rootDir": "src", + "strict": true, + "skipLibCheck": true, + "isolatedModules": true, + "moduleDetection": "force", + "verbatimModuleSyntax": true, + "jsx": "react-jsx" + }, +} \ No newline at end of file diff --git a/src/080-configuring-typescript/201-set-up-types-for-simple-scripts.explainer.ts b/src/080-configuring-typescript/201-set-up-types-for-simple-scripts.explainer.ts new file mode 100644 index 0000000..3b2ae42 --- /dev/null +++ b/src/080-configuring-typescript/201-set-up-types-for-simple-scripts.explainer.ts @@ -0,0 +1 @@ +// Maybe move to external blog? diff --git a/src/080-configuring-typescript/201-set-up-types-for-simple-scripts.problem.ts b/src/080-configuring-typescript/201-set-up-types-for-simple-scripts.problem.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/080-configuring-typescript/201-set-up-types-for-simple-scripts.solution.ts b/src/080-configuring-typescript/201-set-up-types-for-simple-scripts.solution.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/080-configuring-typescript/202-set-up-types-for-test-files.explainer.ts b/src/080-configuring-typescript/202-set-up-types-for-test-files.explainer.ts new file mode 100644 index 0000000..3b2ae42 --- /dev/null +++ b/src/080-configuring-typescript/202-set-up-types-for-test-files.explainer.ts @@ -0,0 +1 @@ +// Maybe move to external blog? diff --git a/src/080-configuring-typescript/202-set-up-types-for-test-files.problem.ts b/src/080-configuring-typescript/202-set-up-types-for-test-files.problem.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/080-configuring-typescript/202-set-up-types-for-test-files.solution.ts b/src/080-configuring-typescript/202-set-up-types-for-test-files.solution.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/080-configuring-typescript/203-set-up-types-for-bundled-web-app.explainer.ts b/src/080-configuring-typescript/203-set-up-types-for-bundled-web-app.explainer.ts new file mode 100644 index 0000000..3b2ae42 --- /dev/null +++ b/src/080-configuring-typescript/203-set-up-types-for-bundled-web-app.explainer.ts @@ -0,0 +1 @@ +// Maybe move to external blog? diff --git a/src/080-configuring-typescript/203-set-up-types-for-bundled-web-app.problem.ts b/src/080-configuring-typescript/203-set-up-types-for-bundled-web-app.problem.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/080-configuring-typescript/203-set-up-types-for-bundled-web-app.solution.ts b/src/080-configuring-typescript/203-set-up-types-for-bundled-web-app.solution.ts deleted file mode 100644 index e69de29..0000000