diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..9ee4bf0 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,21 @@ +name: CI +on: + push: + branches: + - "**" + +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: pnpm/action-setup@v2 + with: + version: 7 + - uses: actions/setup-node@v3 + with: + node-version: 16.x + cache: "pnpm" + + - run: pnpm install --frozen-lockfile + - run: pnpm run ci diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..59ecb4b --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +node_modules +.vscode +tsconfig.temp.json \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..1a3ee86 --- /dev/null +++ b/README.md @@ -0,0 +1,57 @@ + + +## Quickstart + +Clone this repo or [open in Gitpod](https://gitpod.io/#https://github.com/total-typescript/react-typescript-tutorial). + +```sh +# Installs all dependencies +npm install + +# Starts the first exercise +npm run exercise 01 + +# Runs linting and tests on the solution +npm run solution 01 +``` + +## How to take the course + +You'll notice that the course is split into exercises. Each exercise is split into a `*.problem.ts` and a `*.solution.ts`. + +To take an exercise: + +1. Go into `*.problem.ts` +2. Run `npm run exercise 01`, where `01` is the number of the exercise you're on. + +The `exercise` script will run TypeScript typechecks and a test suite on the exercise. + +This course encourages **active, exploratory learning**. In the video, I'll explain a problem, and **you'll be asked to try to find a solution**. To attempt a solution, you'll need to: + +1. Check out [TypeScript's docs](https://www.typescriptlang.org/docs/handbook/intro.html) or the [React TypeScript cheatsheet](https://react-typescript-cheatsheet.netlify.app/) +1. Try to find something that looks relevant. +1. Give it a go to see if it solves the problem. + +You'll know if you've succeeded because the tests will pass. + +**If you succeed**, or **if you get stuck**, unpause the video and check out the `*.solution.ts`. You can see if your solution is better or worse than mine! + +You can run `npm run solution 01` to run the tests and typechecking on the solution. + +## Acknowledgements + +Say thanks to Matt on [Twitter](https://twitter.com/mattpocockuk) or by joining his [Discord](https://discord.gg/8S5ujhfTB3). Consider signing up to his [Total TypeScript course](https://totaltypescript.com). + +## Reference + +### `npm run exercise 01` + +Alias: `npm run e 01` + +Run the corresponding `*.problem.ts` file. + +### `npm run solution 01` + +Alias: `npm run s 01` + +Run the corresponding `*.solution.ts` file. If there are multiple, it runs only the first one. diff --git a/og-image.png b/og-image.png new file mode 100644 index 0000000..bc16cc1 Binary files /dev/null and b/og-image.png differ diff --git a/package.json b/package.json new file mode 100644 index 0000000..80ddd3a --- /dev/null +++ b/package.json @@ -0,0 +1,213 @@ +{ + "name": "total-typescript-book", + "version": "1.0.0", + "main": "index.js", + "author": "Matt Pocock ", + "license": "GPL", + "devDependencies": { + "@total-typescript/exercise-cli": "^0.2.2", + "cross-fetch": "^3.1.5", + "jsdom": "^21.1.1", + "prettier": "^2.8.7", + "typescript": "^5.1.3", + "vite-tsconfig-paths": "^4.0.7", + "vitest": "^0.31.1" + }, + "scripts": { + "exercise": "tt-cli run", + "e": "npm run exercise", + "solution": "tt-cli run --solution", + "s": "npm run solution", + "ci": "(cd scripts/tests && npx vitest run)", + "update-snapshots": "(cd scripts/tests && npx vitest run -u)", + "prepare": "tt-cli prepare-stackblitz", + "e-09": "tt-cli run 09", + "s-09": "tt-cli run 09 --solution", + "e-10": "tt-cli run 10", + "s-10": "tt-cli run 10 --solution", + "e-18": "npm run exercise -- 18", + "s-18": "npm run solution -- 18", + "e-19": "tt-cli run 19", + "s-19": "tt-cli run 19 --solution", + "e-20": "tt-cli run 20", + "s-20": "tt-cli run 20 --solution", + "e-21": "tt-cli run 21", + "s-21": "tt-cli run 21 --solution", + "e-22": "tt-cli run 22", + "s-22": "tt-cli run 22 --solution", + "e-26": "tt-cli run 26", + "s-26": "tt-cli run 26 --solution", + "e-28": "tt-cli run 28", + "s-28": "tt-cli run 28 --solution", + "e-12": "tt-cli run 12", + "s-12": "tt-cli run 12 --solution", + "e-14": "tt-cli run 14", + "s-14": "tt-cli run 14 --solution", + "e-32": "tt-cli run 32", + "s-32": "tt-cli run 32 --solution", + "e-33": "tt-cli run 33", + "s-33": "tt-cli run 33 --solution", + "e-34": "tt-cli run 34", + "s-34": "tt-cli run 34 --solution", + "e-35": "tt-cli run 35", + "s-35": "tt-cli run 35 --solution", + "e-39": "tt-cli run 39", + "s-39": "tt-cli run 39 --solution", + "e-36": "tt-cli run 36", + "s-36": "tt-cli run 36 --solution", + "e-40": "tt-cli run 40", + "s-40": "tt-cli run 40 --solution", + "e-03": "tt-cli run 03", + "s-03": "tt-cli run 03 --solution", + "e-04": "tt-cli run 04", + "s-04": "tt-cli run 04 --solution", + "e-05": "tt-cli run 05", + "s-05": "tt-cli run 05 --solution", + "e-06": "tt-cli run 06", + "s-06": "tt-cli run 06 --solution", + "e-07": "tt-cli run 07", + "s-07": "tt-cli run 07 --solution", + "e-08": "tt-cli run 08", + "s-08": "tt-cli run 08 --solution", + "e-11": "tt-cli run 11", + "s-11": "tt-cli run 11 --solution", + "e-13": "tt-cli run 13", + "s-13": "tt-cli run 13 --solution", + "e-15": "tt-cli run 15", + "s-15": "tt-cli run 15 --solution", + "e-16": "tt-cli run 16", + "s-16": "tt-cli run 16 --solution", + "e-17": "tt-cli run 17", + "s-17": "tt-cli run 17 --solution", + "e-23": "tt-cli run 23", + "s-23": "tt-cli run 23 --solution", + "e-24": "tt-cli run 24", + "s-24": "tt-cli run 24 --solution", + "e-25": "tt-cli run 25", + "s-25": "tt-cli run 25 --solution", + "e-27": "tt-cli run 27", + "s-27": "tt-cli run 27 --solution", + "e-29": "tt-cli run 29", + "s-29": "tt-cli run 29 --solution", + "e-30": "tt-cli run 30", + "s-30": "tt-cli run 30 --solution", + "e-31": "tt-cli run 31", + "s-31": "tt-cli run 31 --solution", + "e-37": "tt-cli run 37", + "s-37": "tt-cli run 37 --solution", + "e-38": "tt-cli run 38", + "s-38": "tt-cli run 38 --solution", + "e-41": "tt-cli run 41", + "s-41": "tt-cli run 41 --solution", + "e-44": "tt-cli run 44", + "s-44": "tt-cli run 44 --solution", + "e-46": "tt-cli run 46", + "s-46": "tt-cli run 46 --solution", + "e-47": "tt-cli run 47", + "s-47": "tt-cli run 47 --solution", + "e-48": "tt-cli run 48", + "s-48": "tt-cli run 48 --solution", + "e-49": "tt-cli run 49", + "s-49": "tt-cli run 49 --solution", + "e-50": "tt-cli run 50", + "s-50": "tt-cli run 50 --solution", + "e-51": "tt-cli run 51", + "s-51": "tt-cli run 51 --solution", + "e-54": "tt-cli run 54", + "s-54": "tt-cli run 54 --solution", + "e-55": "tt-cli run 55", + "s-55": "tt-cli run 55 --solution", + "e-56": "tt-cli run 56", + "s-56": "tt-cli run 56 --solution", + "e-57": "tt-cli run 57", + "s-57": "tt-cli run 57 --solution", + "e-58": "tt-cli run 58", + "s-58": "tt-cli run 58 --solution", + "e-59": "tt-cli run 59", + "s-59": "tt-cli run 59 --solution", + "e-60": "tt-cli run 60", + "s-60": "tt-cli run 60 --solution", + "e-61": "tt-cli run 61", + "s-61": "tt-cli run 61 --solution", + "e-62": "tt-cli run 62", + "s-62": "tt-cli run 62 --solution", + "e-63": "tt-cli run 63", + "s-63": "tt-cli run 63 --solution", + "e-42": "tt-cli run 42", + "s-42": "tt-cli run 42 --solution", + "e-45": "tt-cli run 45", + "s-45": "tt-cli run 45 --solution", + "e-52": "tt-cli run 52", + "s-52": "tt-cli run 52 --solution", + "e-64": "tt-cli run 64", + "s-64": "tt-cli run 64 --solution", + "e-65": "tt-cli run 65", + "s-65": "tt-cli run 65 --solution", + "e-66": "tt-cli run 66", + "s-66": "tt-cli run 66 --solution", + "e-43": "tt-cli run 43", + "s-43": "tt-cli run 43 --solution", + "e-67": "tt-cli run 67", + "s-67": "tt-cli run 67 --solution", + "e-68": "tt-cli run 68", + "s-68": "tt-cli run 68 --solution", + "e-70": "tt-cli run 70", + "s-70": "tt-cli run 70 --solution", + "e-71": "tt-cli run 71", + "s-71": "tt-cli run 71 --solution", + "e-73": "tt-cli run 73", + "s-73": "tt-cli run 73 --solution", + "e-69": "tt-cli run 69", + "s-69": "tt-cli run 69 --solution", + "e-74": "tt-cli run 74", + "s-74": "tt-cli run 74 --solution", + "e-76": "tt-cli run 76", + "s-76": "tt-cli run 76 --solution", + "e-020": "tt-cli run 020", + "s-020": "tt-cli run 020 --solution", + "e-022": "tt-cli run 022", + "s-022": "tt-cli run 022 --solution", + "e-023": "tt-cli run 023", + "s-023": "tt-cli run 023 --solution", + "e-024": "tt-cli run 024", + "s-024": "tt-cli run 024 --solution", + "e-025": "tt-cli run 025", + "s-025": "tt-cli run 025 --solution", + "e-026": "tt-cli run 026", + "s-026": "tt-cli run 026 --solution", + "e-027": "tt-cli run 027", + "s-027": "tt-cli run 027 --solution", + "e-028": "tt-cli run 028", + "s-028": "tt-cli run 028 --solution", + "e-029": "tt-cli run 029", + "s-029": "tt-cli run 029 --solution", + "e-030": "tt-cli run 030", + "s-030": "tt-cli run 030 --solution", + "e-031": "tt-cli run 031", + "s-031": "tt-cli run 031 --solution", + "e-032": "tt-cli run 032", + "s-032": "tt-cli run 032 --solution", + "e-033": "tt-cli run 033", + "s-033": "tt-cli run 033 --solution", + "e-034": "tt-cli run 034", + "s-034": "tt-cli run 034 --solution", + "e-035": "tt-cli run 035", + "s-035": "tt-cli run 035 --solution", + "e-036": "tt-cli run 036", + "s-036": "tt-cli run 036 --solution", + "e-037": "tt-cli run 037", + "s-037": "tt-cli run 037 --solution" + }, + "dependencies": { + "@tanstack/react-query": "^4.29.12", + "@types/express": "^4.17.13", + "@types/react": "^18.2.8", + "@types/react-dom": "^18.2.4", + "express": "^4.18.1", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "react-hook-form": "^7.44.3", + "react-select": "^5.7.3", + "zod": "^3.21.4" + } +} \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml new file mode 100644 index 0000000..b2008d3 --- /dev/null +++ b/pnpm-lock.yaml @@ -0,0 +1,2343 @@ +lockfileVersion: 5.4 + +specifiers: + '@tanstack/react-query': ^4.29.12 + '@total-typescript/exercise-cli': ^0.2.2 + '@types/express': ^4.17.13 + '@types/react': ^18.2.8 + '@types/react-dom': ^18.2.4 + cross-fetch: ^3.1.5 + express: ^4.18.1 + jsdom: ^21.1.1 + prettier: ^2.8.7 + react: ^18.2.0 + react-dom: ^18.2.0 + react-hook-form: ^7.44.3 + react-select: ^5.7.3 + typescript: ^5.1.3 + vite-tsconfig-paths: ^4.0.7 + vitest: ^0.31.1 + zod: ^3.21.4 + +dependencies: + '@tanstack/react-query': 4.32.6_biqbaboplfbrettd7655fr4n2y + '@types/express': 4.17.17 + '@types/react': 18.2.20 + '@types/react-dom': 18.2.7 + express: 4.18.2 + react: 18.2.0 + react-dom: 18.2.0_react@18.2.0 + react-hook-form: 7.45.4_react@18.2.0 + react-select: 5.7.4_qflmzdebv2ewfrqz6op6ohcc2q + zod: 3.22.0 + +devDependencies: + '@total-typescript/exercise-cli': 0.2.2 + cross-fetch: 3.1.8 + jsdom: 21.1.2 + prettier: 2.8.8 + typescript: 5.1.6 + vite-tsconfig-paths: 4.2.0_typescript@5.1.6 + vitest: 0.31.4_jsdom@21.1.2 + +packages: + + /@babel/code-frame/7.22.10: + resolution: {integrity: sha512-/KKIMG4UEL35WmI9OlvMhurwtytjvXoFcGNrOvyG9zIzA8YmPjVtIZUf7b05+TPO7G7/GEmLHDaoCgACHl9hhA==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/highlight': 7.22.10 + chalk: 2.4.2 + dev: false + + /@babel/helper-module-imports/7.22.5: + resolution: {integrity: sha512-8Dl6+HD/cKifutF5qGd/8ZJi84QeAKh+CEe1sBzz8UayBBGg1dAIJrdHOcOM5b2MpzWL2yuotJTtGjETq0qjXg==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.22.10 + dev: false + + /@babel/helper-string-parser/7.22.5: + resolution: {integrity: sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==} + engines: {node: '>=6.9.0'} + dev: false + + /@babel/helper-validator-identifier/7.22.5: + resolution: {integrity: sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==} + engines: {node: '>=6.9.0'} + dev: false + + /@babel/highlight/7.22.10: + resolution: {integrity: sha512-78aUtVcT7MUscr0K5mIEnkwxPE0MaxkR5RxRwuHaQ+JuU5AmTPhY+do2mdzVTnIJJpyBglql2pehuBIWHug+WQ==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-validator-identifier': 7.22.5 + chalk: 2.4.2 + js-tokens: 4.0.0 + dev: false + + /@babel/runtime/7.22.10: + resolution: {integrity: sha512-21t/fkKLMZI4pqP2wlmsQAWnYW1PDyKyyUV4vCi+B25ydmdaYTKXPwCj0BzSUnZf4seIiYvSA3jcZ3gdsMFkLQ==} + engines: {node: '>=6.9.0'} + dependencies: + regenerator-runtime: 0.14.0 + dev: false + + /@babel/types/7.22.10: + resolution: {integrity: sha512-obaoigiLrlDZ7TUQln/8m4mSqIW2QFeOrCQc9r+xsaHGNoplVNYlRVpsfE8Vj35GEm2ZH4ZhrNYogs/3fj85kg==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-string-parser': 7.22.5 + '@babel/helper-validator-identifier': 7.22.5 + to-fast-properties: 2.0.0 + dev: false + + /@emotion/babel-plugin/11.11.0: + resolution: {integrity: sha512-m4HEDZleaaCH+XgDDsPF15Ht6wTLsgDTeR3WYj9Q/k76JtWhrJjcP4+/XlG8LGT/Rol9qUfOIztXeA84ATpqPQ==} + dependencies: + '@babel/helper-module-imports': 7.22.5 + '@babel/runtime': 7.22.10 + '@emotion/hash': 0.9.1 + '@emotion/memoize': 0.8.1 + '@emotion/serialize': 1.1.2 + babel-plugin-macros: 3.1.0 + convert-source-map: 1.9.0 + escape-string-regexp: 4.0.0 + find-root: 1.1.0 + source-map: 0.5.7 + stylis: 4.2.0 + dev: false + + /@emotion/cache/11.11.0: + resolution: {integrity: sha512-P34z9ssTCBi3e9EI1ZsWpNHcfY1r09ZO0rZbRO2ob3ZQMnFI35jB536qoXbkdesr5EUhYi22anuEJuyxifaqAQ==} + dependencies: + '@emotion/memoize': 0.8.1 + '@emotion/sheet': 1.2.2 + '@emotion/utils': 1.2.1 + '@emotion/weak-memoize': 0.3.1 + stylis: 4.2.0 + dev: false + + /@emotion/hash/0.9.1: + resolution: {integrity: sha512-gJB6HLm5rYwSLI6PQa+X1t5CFGrv1J1TWG+sOyMCeKz2ojaj6Fnl/rZEspogG+cvqbt4AE/2eIyD2QfLKTBNlQ==} + dev: false + + /@emotion/memoize/0.8.1: + resolution: {integrity: sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA==} + dev: false + + /@emotion/react/11.11.1_j3ahe22lw6ac2w6qvqp4kjqnqy: + resolution: {integrity: sha512-5mlW1DquU5HaxjLkfkGN1GA/fvVGdyHURRiX/0FHl2cfIfRxSOfmxEH5YS43edp0OldZrZ+dkBKbngxcNCdZvA==} + peerDependencies: + '@types/react': '*' + react: '>=16.8.0' + peerDependenciesMeta: + '@types/react': + optional: true + dependencies: + '@babel/runtime': 7.22.10 + '@emotion/babel-plugin': 11.11.0 + '@emotion/cache': 11.11.0 + '@emotion/serialize': 1.1.2 + '@emotion/use-insertion-effect-with-fallbacks': 1.0.1_react@18.2.0 + '@emotion/utils': 1.2.1 + '@emotion/weak-memoize': 0.3.1 + '@types/react': 18.2.20 + hoist-non-react-statics: 3.3.2 + react: 18.2.0 + dev: false + + /@emotion/serialize/1.1.2: + resolution: {integrity: sha512-zR6a/fkFP4EAcCMQtLOhIgpprZOwNmCldtpaISpvz348+DP4Mz8ZoKaGGCQpbzepNIUWbq4w6hNZkwDyKoS+HA==} + dependencies: + '@emotion/hash': 0.9.1 + '@emotion/memoize': 0.8.1 + '@emotion/unitless': 0.8.1 + '@emotion/utils': 1.2.1 + csstype: 3.1.2 + dev: false + + /@emotion/sheet/1.2.2: + resolution: {integrity: sha512-0QBtGvaqtWi+nx6doRwDdBIzhNdZrXUppvTM4dtZZWEGTXL/XE/yJxLMGlDT1Gt+UHH5IX1n+jkXyytE/av7OA==} + dev: false + + /@emotion/unitless/0.8.1: + resolution: {integrity: sha512-KOEGMu6dmJZtpadb476IsZBclKvILjopjUii3V+7MnXIQCYh8W3NgNcgwo21n9LXZX6EDIKvqfjYxXebDwxKmQ==} + dev: false + + /@emotion/use-insertion-effect-with-fallbacks/1.0.1_react@18.2.0: + resolution: {integrity: sha512-jT/qyKZ9rzLErtrjGgdkMBn2OP8wl0G3sQlBb3YPryvKHsjvINUhVaPFfP+fpBcOkmrVOVEEHQFJ7nbj2TH2gw==} + peerDependencies: + react: '>=16.8.0' + dependencies: + react: 18.2.0 + dev: false + + /@emotion/utils/1.2.1: + resolution: {integrity: sha512-Y2tGf3I+XVnajdItskUCn6LX+VUDmP6lTL4fcqsXAv43dnlbZiuW4MWQW38rW/BVWSE7Q/7+XQocmpnRYILUmg==} + dev: false + + /@emotion/weak-memoize/0.3.1: + resolution: {integrity: sha512-EsBwpc7hBUJWAsNPBmJy4hxWx12v6bshQsldrVmjxJoc3isbxhOrF2IcCpaXxfvq03NwkI7sbsOLXbYuqF/8Ww==} + dev: false + + /@esbuild/android-arm/0.18.20: + resolution: {integrity: sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-arm64/0.18.20: + resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-x64/0.18.20: + resolution: {integrity: sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-arm64/0.18.20: + resolution: {integrity: sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-x64/0.18.20: + resolution: {integrity: sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-arm64/0.18.20: + resolution: {integrity: sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-x64/0.18.20: + resolution: {integrity: sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm/0.18.20: + resolution: {integrity: sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm64/0.18.20: + resolution: {integrity: sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ia32/0.18.20: + resolution: {integrity: sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-loong64/0.18.20: + resolution: {integrity: sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-mips64el/0.18.20: + resolution: {integrity: sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ppc64/0.18.20: + resolution: {integrity: sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-riscv64/0.18.20: + resolution: {integrity: sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-s390x/0.18.20: + resolution: {integrity: sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-x64/0.18.20: + resolution: {integrity: sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/netbsd-x64/0.18.20: + resolution: {integrity: sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/openbsd-x64/0.18.20: + resolution: {integrity: sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/sunos-x64/0.18.20: + resolution: {integrity: sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-arm64/0.18.20: + resolution: {integrity: sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-ia32/0.18.20: + resolution: {integrity: sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-x64/0.18.20: + resolution: {integrity: sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@floating-ui/core/1.4.1: + resolution: {integrity: sha512-jk3WqquEJRlcyu7997NtR5PibI+y5bi+LS3hPmguVClypenMsCY3CBa3LAQnozRCtCrYWSEtAdiskpamuJRFOQ==} + dependencies: + '@floating-ui/utils': 0.1.1 + dev: false + + /@floating-ui/dom/1.5.1: + resolution: {integrity: sha512-KwvVcPSXg6mQygvA1TjbN/gh///36kKtllIF8SUm0qpFj8+rvYrpvlYdL1JoA71SHpDqgSSdGOSoQ0Mp3uY5aw==} + dependencies: + '@floating-ui/core': 1.4.1 + '@floating-ui/utils': 0.1.1 + dev: false + + /@floating-ui/utils/0.1.1: + resolution: {integrity: sha512-m0G6wlnhm/AX0H12IOWtK8gASEMffnX08RtKkCgTdHb9JpHKGloI7icFfLg9ZmQeavcvR0PKmzxClyuFPSjKWw==} + dev: false + + /@jridgewell/sourcemap-codec/1.4.15: + resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} + dev: true + + /@nodelib/fs.scandir/2.1.5: + resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} + engines: {node: '>= 8'} + dependencies: + '@nodelib/fs.stat': 2.0.5 + run-parallel: 1.2.0 + dev: true + + /@nodelib/fs.stat/2.0.5: + resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} + engines: {node: '>= 8'} + dev: true + + /@nodelib/fs.walk/1.2.8: + resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} + engines: {node: '>= 8'} + dependencies: + '@nodelib/fs.scandir': 2.1.5 + fastq: 1.15.0 + dev: true + + /@tanstack/query-core/4.32.6: + resolution: {integrity: sha512-YVB+mVWENQwPyv+40qO7flMgKZ0uI41Ph7qXC2Zf1ft5AIGfnXnMZyifB2ghhZ27u+5wm5mlzO4Y6lwwadzxCA==} + dev: false + + /@tanstack/react-query/4.32.6_biqbaboplfbrettd7655fr4n2y: + resolution: {integrity: sha512-AITu/IKJJJXsHHeXNBy5bclu12t08usMCY0vFC2dh9SP/w6JAk5U9GwfjOIPj3p+ATADZvxQPe8UiCtMLNeQbg==} + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + react-native: '*' + peerDependenciesMeta: + react-dom: + optional: true + react-native: + optional: true + dependencies: + '@tanstack/query-core': 4.32.6 + react: 18.2.0 + react-dom: 18.2.0_react@18.2.0 + use-sync-external-store: 1.2.0_react@18.2.0 + dev: false + + /@tootallnate/once/2.0.0: + resolution: {integrity: sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==} + engines: {node: '>= 10'} + dev: true + + /@total-typescript/exercise-cli/0.2.2: + resolution: {integrity: sha512-0DYEpYQThv+kzj3Pqi1lN08XB22YgHTXnAnnQqO5/7jQ6yQtty4rEu0FoSm+xwzO8nn8NAwjotpYrEq5Lf6jBg==} + hasBin: true + dependencies: + chokidar: 3.5.3 + commander: 10.0.1 + fast-glob: 3.3.1 + jsonc-parser: 3.2.0 + dev: true + + /@types/body-parser/1.19.2: + resolution: {integrity: sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==} + dependencies: + '@types/connect': 3.4.35 + '@types/node': 20.5.0 + dev: false + + /@types/chai-subset/1.3.3: + resolution: {integrity: sha512-frBecisrNGz+F4T6bcc+NLeolfiojh5FxW2klu669+8BARtyQv2C/GkNW6FUodVe4BroGMP/wER/YDGc7rEllw==} + dependencies: + '@types/chai': 4.3.5 + dev: true + + /@types/chai/4.3.5: + resolution: {integrity: sha512-mEo1sAde+UCE6b2hxn332f1g1E8WfYRu6p5SvTKr2ZKC1f7gFJXk4h5PyGP9Dt6gCaG8y8XhwnXWC6Iy2cmBng==} + dev: true + + /@types/connect/3.4.35: + resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==} + dependencies: + '@types/node': 20.5.0 + dev: false + + /@types/express-serve-static-core/4.17.35: + resolution: {integrity: sha512-wALWQwrgiB2AWTT91CB62b6Yt0sNHpznUXeZEcnPU3DRdlDIz74x8Qg1UUYKSVFi+va5vKOLYRBI1bRKiLLKIg==} + dependencies: + '@types/node': 20.5.0 + '@types/qs': 6.9.7 + '@types/range-parser': 1.2.4 + '@types/send': 0.17.1 + dev: false + + /@types/express/4.17.17: + resolution: {integrity: sha512-Q4FmmuLGBG58btUnfS1c1r/NQdlp3DMfGDGig8WhfpA2YRUtEkxAjkZb0yvplJGYdF1fsQ81iMDcH24sSCNC/Q==} + dependencies: + '@types/body-parser': 1.19.2 + '@types/express-serve-static-core': 4.17.35 + '@types/qs': 6.9.7 + '@types/serve-static': 1.15.2 + dev: false + + /@types/http-errors/2.0.1: + resolution: {integrity: sha512-/K3ds8TRAfBvi5vfjuz8y6+GiAYBZ0x4tXv1Av6CWBWn0IlADc+ZX9pMq7oU0fNQPnBwIZl3rmeLp6SBApbxSQ==} + dev: false + + /@types/mime/1.3.2: + resolution: {integrity: sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw==} + dev: false + + /@types/mime/3.0.1: + resolution: {integrity: sha512-Y4XFY5VJAuw0FgAqPNd6NNoV44jbq9Bz2L7Rh/J6jLTiHBSBJa9fxqQIvkIld4GsoDOcCbvzOUAbLPsSKKg+uA==} + dev: false + + /@types/node/20.5.0: + resolution: {integrity: sha512-Mgq7eCtoTjT89FqNoTzzXg2XvCi5VMhRV6+I2aYanc6kQCBImeNaAYRs/DyoVqk1YEUJK5gN9VO7HRIdz4Wo3Q==} + + /@types/parse-json/4.0.0: + resolution: {integrity: sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==} + dev: false + + /@types/prop-types/15.7.5: + resolution: {integrity: sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==} + dev: false + + /@types/qs/6.9.7: + resolution: {integrity: sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==} + dev: false + + /@types/range-parser/1.2.4: + resolution: {integrity: sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==} + dev: false + + /@types/react-dom/18.2.7: + resolution: {integrity: sha512-GRaAEriuT4zp9N4p1i8BDBYmEyfo+xQ3yHjJU4eiK5NDa1RmUZG+unZABUTK4/Ox/M+GaHwb6Ow8rUITrtjszA==} + dependencies: + '@types/react': 18.2.20 + dev: false + + /@types/react-transition-group/4.4.6: + resolution: {integrity: sha512-VnCdSxfcm08KjsJVQcfBmhEQAPnLB8G08hAxn39azX1qYBQ/5RVQuoHuKIcfKOdncuaUvEpFKFzEvbtIMsfVew==} + dependencies: + '@types/react': 18.2.20 + dev: false + + /@types/react/18.2.20: + resolution: {integrity: sha512-WKNtmsLWJM/3D5mG4U84cysVY31ivmyw85dE84fOCk5Hx78wezB/XEjVPWl2JTZ5FkEeaTJf+VgUAUn3PE7Isw==} + dependencies: + '@types/prop-types': 15.7.5 + '@types/scheduler': 0.16.3 + csstype: 3.1.2 + dev: false + + /@types/scheduler/0.16.3: + resolution: {integrity: sha512-5cJ8CB4yAx7BH1oMvdU0Jh9lrEXyPkar6F9G/ERswkCuvP4KQZfZkSjcMbAICCpQTN4OuZn8tz0HiKv9TGZgrQ==} + dev: false + + /@types/send/0.17.1: + resolution: {integrity: sha512-Cwo8LE/0rnvX7kIIa3QHCkcuF21c05Ayb0ZfxPiv0W8VRiZiNW/WuRupHKpqqGVGf7SUA44QSOUKaEd9lIrd/Q==} + dependencies: + '@types/mime': 1.3.2 + '@types/node': 20.5.0 + dev: false + + /@types/serve-static/1.15.2: + resolution: {integrity: sha512-J2LqtvFYCzaj8pVYKw8klQXrLLk7TBZmQ4ShlcdkELFKGwGMfevMLneMMRkMgZxotOD9wg497LpC7O8PcvAmfw==} + dependencies: + '@types/http-errors': 2.0.1 + '@types/mime': 3.0.1 + '@types/node': 20.5.0 + dev: false + + /@vitest/expect/0.31.4: + resolution: {integrity: sha512-tibyx8o7GUyGHZGyPgzwiaPaLDQ9MMuCOrc03BYT0nryUuhLbL7NV2r/q98iv5STlwMgaKuFJkgBW/8iPKwlSg==} + dependencies: + '@vitest/spy': 0.31.4 + '@vitest/utils': 0.31.4 + chai: 4.3.7 + dev: true + + /@vitest/runner/0.31.4: + resolution: {integrity: sha512-Wgm6UER+gwq6zkyrm5/wbpXGF+g+UBB78asJlFkIOwyse0pz8lZoiC6SW5i4gPnls/zUcPLWS7Zog0LVepXnpg==} + dependencies: + '@vitest/utils': 0.31.4 + concordance: 5.0.4 + p-limit: 4.0.0 + pathe: 1.1.1 + dev: true + + /@vitest/snapshot/0.31.4: + resolution: {integrity: sha512-LemvNumL3NdWSmfVAMpXILGyaXPkZbG5tyl6+RQSdcHnTj6hvA49UAI8jzez9oQyE/FWLKRSNqTGzsHuk89LRA==} + dependencies: + magic-string: 0.30.2 + pathe: 1.1.1 + pretty-format: 27.5.1 + dev: true + + /@vitest/spy/0.31.4: + resolution: {integrity: sha512-3ei5ZH1s3aqbEyftPAzSuunGICRuhE+IXOmpURFdkm5ybUADk+viyQfejNk6q8M5QGX8/EVKw+QWMEP3DTJDag==} + dependencies: + tinyspy: 2.1.1 + dev: true + + /@vitest/utils/0.31.4: + resolution: {integrity: sha512-DobZbHacWznoGUfYU8XDPY78UubJxXfMNY1+SUdOp1NsI34eopSA6aZMeaGu10waSOeYwE8lxrd/pLfT0RMxjQ==} + dependencies: + concordance: 5.0.4 + loupe: 2.3.6 + pretty-format: 27.5.1 + dev: true + + /abab/2.0.6: + resolution: {integrity: sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==} + dev: true + + /accepts/1.3.8: + resolution: {integrity: sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==} + engines: {node: '>= 0.6'} + dependencies: + mime-types: 2.1.35 + negotiator: 0.6.3 + dev: false + + /acorn-globals/7.0.1: + resolution: {integrity: sha512-umOSDSDrfHbTNPuNpC2NSnnA3LUrqpevPb4T9jRx4MagXNS0rs+gwiTcAvqCRmsD6utzsrzNt+ebm00SNWiC3Q==} + dependencies: + acorn: 8.10.0 + acorn-walk: 8.2.0 + dev: true + + /acorn-walk/8.2.0: + resolution: {integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==} + engines: {node: '>=0.4.0'} + dev: true + + /acorn/8.10.0: + resolution: {integrity: sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==} + engines: {node: '>=0.4.0'} + hasBin: true + dev: true + + /agent-base/6.0.2: + resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} + engines: {node: '>= 6.0.0'} + dependencies: + debug: 4.3.4 + transitivePeerDependencies: + - supports-color + dev: true + + /ansi-regex/5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + dev: true + + /ansi-styles/3.2.1: + resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} + engines: {node: '>=4'} + dependencies: + color-convert: 1.9.3 + dev: false + + /ansi-styles/5.2.0: + resolution: {integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==} + engines: {node: '>=10'} + dev: true + + /anymatch/3.1.3: + resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} + engines: {node: '>= 8'} + dependencies: + normalize-path: 3.0.0 + picomatch: 2.3.1 + dev: true + + /array-flatten/1.1.1: + resolution: {integrity: sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==} + dev: false + + /assertion-error/1.1.0: + resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==} + dev: true + + /asynckit/0.4.0: + resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} + dev: true + + /babel-plugin-macros/3.1.0: + resolution: {integrity: sha512-Cg7TFGpIr01vOQNODXOOaGz2NpCU5gl8x1qJFbb6hbZxR7XrcE2vtbAsTAbJ7/xwJtUuJEw8K8Zr/AE0LHlesg==} + engines: {node: '>=10', npm: '>=6'} + dependencies: + '@babel/runtime': 7.22.10 + cosmiconfig: 7.1.0 + resolve: 1.22.4 + dev: false + + /binary-extensions/2.2.0: + resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} + engines: {node: '>=8'} + dev: true + + /blueimp-md5/2.19.0: + resolution: {integrity: sha512-DRQrD6gJyy8FbiE4s+bDoXS9hiW3Vbx5uCdwvcCf3zLHL+Iv7LtGHLpr+GZV8rHG8tK766FGYBwRbu8pELTt+w==} + dev: true + + /body-parser/1.20.1: + resolution: {integrity: sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==} + engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} + dependencies: + bytes: 3.1.2 + content-type: 1.0.5 + debug: 2.6.9 + depd: 2.0.0 + destroy: 1.2.0 + http-errors: 2.0.0 + iconv-lite: 0.4.24 + on-finished: 2.4.1 + qs: 6.11.0 + raw-body: 2.5.1 + type-is: 1.6.18 + unpipe: 1.0.0 + transitivePeerDependencies: + - supports-color + dev: false + + /braces/3.0.2: + resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} + engines: {node: '>=8'} + dependencies: + fill-range: 7.0.1 + dev: true + + /bytes/3.1.2: + resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==} + engines: {node: '>= 0.8'} + dev: false + + /cac/6.7.14: + resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} + engines: {node: '>=8'} + dev: true + + /call-bind/1.0.2: + resolution: {integrity: sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==} + dependencies: + function-bind: 1.1.1 + get-intrinsic: 1.2.1 + dev: false + + /callsites/3.1.0: + resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} + engines: {node: '>=6'} + dev: false + + /chai/4.3.7: + resolution: {integrity: sha512-HLnAzZ2iupm25PlN0xFreAlBA5zaBSv3og0DdeGA4Ar6h6rJ3A0rolRUKJhSF2V10GZKDgWF/VmAEsNWjCRB+A==} + engines: {node: '>=4'} + dependencies: + assertion-error: 1.1.0 + check-error: 1.0.2 + deep-eql: 4.1.3 + get-func-name: 2.0.0 + loupe: 2.3.6 + pathval: 1.1.1 + type-detect: 4.0.8 + dev: true + + /chalk/2.4.2: + resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} + engines: {node: '>=4'} + dependencies: + ansi-styles: 3.2.1 + escape-string-regexp: 1.0.5 + supports-color: 5.5.0 + dev: false + + /check-error/1.0.2: + resolution: {integrity: sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==} + dev: true + + /chokidar/3.5.3: + resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==} + engines: {node: '>= 8.10.0'} + dependencies: + anymatch: 3.1.3 + braces: 3.0.2 + glob-parent: 5.1.2 + is-binary-path: 2.1.0 + is-glob: 4.0.3 + normalize-path: 3.0.0 + readdirp: 3.6.0 + optionalDependencies: + fsevents: 2.3.2 + dev: true + + /color-convert/1.9.3: + resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} + dependencies: + color-name: 1.1.3 + dev: false + + /color-name/1.1.3: + resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} + dev: false + + /combined-stream/1.0.8: + resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} + engines: {node: '>= 0.8'} + dependencies: + delayed-stream: 1.0.0 + dev: true + + /commander/10.0.1: + resolution: {integrity: sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==} + engines: {node: '>=14'} + dev: true + + /concordance/5.0.4: + resolution: {integrity: sha512-OAcsnTEYu1ARJqWVGwf4zh4JDfHZEaSNlNccFmt8YjB2l/n19/PF2viLINHc57vO4FKIAFl2FWASIGZZWZ2Kxw==} + engines: {node: '>=10.18.0 <11 || >=12.14.0 <13 || >=14'} + dependencies: + date-time: 3.1.0 + esutils: 2.0.3 + fast-diff: 1.3.0 + js-string-escape: 1.0.1 + lodash: 4.17.21 + md5-hex: 3.0.1 + semver: 7.5.4 + well-known-symbols: 2.0.0 + dev: true + + /content-disposition/0.5.4: + resolution: {integrity: sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==} + engines: {node: '>= 0.6'} + dependencies: + safe-buffer: 5.2.1 + dev: false + + /content-type/1.0.5: + resolution: {integrity: sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==} + engines: {node: '>= 0.6'} + dev: false + + /convert-source-map/1.9.0: + resolution: {integrity: sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==} + dev: false + + /cookie-signature/1.0.6: + resolution: {integrity: sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==} + dev: false + + /cookie/0.5.0: + resolution: {integrity: sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==} + engines: {node: '>= 0.6'} + dev: false + + /cosmiconfig/7.1.0: + resolution: {integrity: sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==} + engines: {node: '>=10'} + dependencies: + '@types/parse-json': 4.0.0 + import-fresh: 3.3.0 + parse-json: 5.2.0 + path-type: 4.0.0 + yaml: 1.10.2 + dev: false + + /cross-fetch/3.1.8: + resolution: {integrity: sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==} + dependencies: + node-fetch: 2.6.12 + transitivePeerDependencies: + - encoding + dev: true + + /cssstyle/3.0.0: + resolution: {integrity: sha512-N4u2ABATi3Qplzf0hWbVCdjenim8F3ojEXpBDF5hBpjzW182MjNGLqfmQ0SkSPeQ+V86ZXgeH8aXj6kayd4jgg==} + engines: {node: '>=14'} + dependencies: + rrweb-cssom: 0.6.0 + dev: true + + /csstype/3.1.2: + resolution: {integrity: sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==} + dev: false + + /data-urls/4.0.0: + resolution: {integrity: sha512-/mMTei/JXPqvFqQtfyTowxmJVwr2PVAeCcDxyFf6LhoOu/09TX2OX3kb2wzi4DMXcfj4OItwDOnhl5oziPnT6g==} + engines: {node: '>=14'} + dependencies: + abab: 2.0.6 + whatwg-mimetype: 3.0.0 + whatwg-url: 12.0.1 + dev: true + + /date-time/3.1.0: + resolution: {integrity: sha512-uqCUKXE5q1PNBXjPqvwhwJf9SwMoAHBgWJ6DcrnS5o+W2JOiIILl0JEdVD8SGujrNS02GGxgwAg2PN2zONgtjg==} + engines: {node: '>=6'} + dependencies: + time-zone: 1.0.0 + dev: true + + /debug/2.6.9: + resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + dependencies: + ms: 2.0.0 + dev: false + + /debug/4.3.4: + resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + dependencies: + ms: 2.1.2 + dev: true + + /decimal.js/10.4.3: + resolution: {integrity: sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==} + dev: true + + /deep-eql/4.1.3: + resolution: {integrity: sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==} + engines: {node: '>=6'} + dependencies: + type-detect: 4.0.8 + dev: true + + /delayed-stream/1.0.0: + resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} + engines: {node: '>=0.4.0'} + dev: true + + /depd/2.0.0: + resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==} + engines: {node: '>= 0.8'} + dev: false + + /destroy/1.2.0: + resolution: {integrity: sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==} + engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} + dev: false + + /dom-helpers/5.2.1: + resolution: {integrity: sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==} + dependencies: + '@babel/runtime': 7.22.10 + csstype: 3.1.2 + dev: false + + /domexception/4.0.0: + resolution: {integrity: sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==} + engines: {node: '>=12'} + dependencies: + webidl-conversions: 7.0.0 + dev: true + + /ee-first/1.1.1: + resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} + dev: false + + /encodeurl/1.0.2: + resolution: {integrity: sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==} + engines: {node: '>= 0.8'} + dev: false + + /entities/4.5.0: + resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} + engines: {node: '>=0.12'} + dev: true + + /error-ex/1.3.2: + resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} + dependencies: + is-arrayish: 0.2.1 + dev: false + + /esbuild/0.18.20: + resolution: {integrity: sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@esbuild/android-arm': 0.18.20 + '@esbuild/android-arm64': 0.18.20 + '@esbuild/android-x64': 0.18.20 + '@esbuild/darwin-arm64': 0.18.20 + '@esbuild/darwin-x64': 0.18.20 + '@esbuild/freebsd-arm64': 0.18.20 + '@esbuild/freebsd-x64': 0.18.20 + '@esbuild/linux-arm': 0.18.20 + '@esbuild/linux-arm64': 0.18.20 + '@esbuild/linux-ia32': 0.18.20 + '@esbuild/linux-loong64': 0.18.20 + '@esbuild/linux-mips64el': 0.18.20 + '@esbuild/linux-ppc64': 0.18.20 + '@esbuild/linux-riscv64': 0.18.20 + '@esbuild/linux-s390x': 0.18.20 + '@esbuild/linux-x64': 0.18.20 + '@esbuild/netbsd-x64': 0.18.20 + '@esbuild/openbsd-x64': 0.18.20 + '@esbuild/sunos-x64': 0.18.20 + '@esbuild/win32-arm64': 0.18.20 + '@esbuild/win32-ia32': 0.18.20 + '@esbuild/win32-x64': 0.18.20 + dev: true + + /escape-html/1.0.3: + resolution: {integrity: sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==} + dev: false + + /escape-string-regexp/1.0.5: + resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} + engines: {node: '>=0.8.0'} + dev: false + + /escape-string-regexp/4.0.0: + resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} + engines: {node: '>=10'} + dev: false + + /escodegen/2.1.0: + resolution: {integrity: sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==} + engines: {node: '>=6.0'} + hasBin: true + dependencies: + esprima: 4.0.1 + estraverse: 5.3.0 + esutils: 2.0.3 + optionalDependencies: + source-map: 0.6.1 + dev: true + + /esprima/4.0.1: + resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} + engines: {node: '>=4'} + hasBin: true + dev: true + + /estraverse/5.3.0: + resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} + engines: {node: '>=4.0'} + dev: true + + /esutils/2.0.3: + resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} + engines: {node: '>=0.10.0'} + dev: true + + /etag/1.8.1: + resolution: {integrity: sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==} + engines: {node: '>= 0.6'} + dev: false + + /express/4.18.2: + resolution: {integrity: sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==} + engines: {node: '>= 0.10.0'} + dependencies: + accepts: 1.3.8 + array-flatten: 1.1.1 + body-parser: 1.20.1 + content-disposition: 0.5.4 + content-type: 1.0.5 + cookie: 0.5.0 + cookie-signature: 1.0.6 + debug: 2.6.9 + depd: 2.0.0 + encodeurl: 1.0.2 + escape-html: 1.0.3 + etag: 1.8.1 + finalhandler: 1.2.0 + fresh: 0.5.2 + http-errors: 2.0.0 + merge-descriptors: 1.0.1 + methods: 1.1.2 + on-finished: 2.4.1 + parseurl: 1.3.3 + path-to-regexp: 0.1.7 + proxy-addr: 2.0.7 + qs: 6.11.0 + range-parser: 1.2.1 + safe-buffer: 5.2.1 + send: 0.18.0 + serve-static: 1.15.0 + setprototypeof: 1.2.0 + statuses: 2.0.1 + type-is: 1.6.18 + utils-merge: 1.0.1 + vary: 1.1.2 + transitivePeerDependencies: + - supports-color + dev: false + + /fast-diff/1.3.0: + resolution: {integrity: sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==} + dev: true + + /fast-glob/3.3.1: + resolution: {integrity: sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==} + engines: {node: '>=8.6.0'} + dependencies: + '@nodelib/fs.stat': 2.0.5 + '@nodelib/fs.walk': 1.2.8 + glob-parent: 5.1.2 + merge2: 1.4.1 + micromatch: 4.0.5 + dev: true + + /fastq/1.15.0: + resolution: {integrity: sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==} + dependencies: + reusify: 1.0.4 + dev: true + + /fill-range/7.0.1: + resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} + engines: {node: '>=8'} + dependencies: + to-regex-range: 5.0.1 + dev: true + + /finalhandler/1.2.0: + resolution: {integrity: sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==} + engines: {node: '>= 0.8'} + dependencies: + debug: 2.6.9 + encodeurl: 1.0.2 + escape-html: 1.0.3 + on-finished: 2.4.1 + parseurl: 1.3.3 + statuses: 2.0.1 + unpipe: 1.0.0 + transitivePeerDependencies: + - supports-color + dev: false + + /find-root/1.1.0: + resolution: {integrity: sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==} + dev: false + + /form-data/4.0.0: + resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} + engines: {node: '>= 6'} + dependencies: + asynckit: 0.4.0 + combined-stream: 1.0.8 + mime-types: 2.1.35 + dev: true + + /forwarded/0.2.0: + resolution: {integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==} + engines: {node: '>= 0.6'} + dev: false + + /fresh/0.5.2: + resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==} + engines: {node: '>= 0.6'} + dev: false + + /fsevents/2.3.2: + resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /function-bind/1.1.1: + resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} + dev: false + + /get-func-name/2.0.0: + resolution: {integrity: sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==} + dev: true + + /get-intrinsic/1.2.1: + resolution: {integrity: sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==} + dependencies: + function-bind: 1.1.1 + has: 1.0.3 + has-proto: 1.0.1 + has-symbols: 1.0.3 + dev: false + + /glob-parent/5.1.2: + resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} + engines: {node: '>= 6'} + dependencies: + is-glob: 4.0.3 + dev: true + + /globrex/0.1.2: + resolution: {integrity: sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==} + dev: true + + /has-flag/3.0.0: + resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} + engines: {node: '>=4'} + dev: false + + /has-proto/1.0.1: + resolution: {integrity: sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==} + engines: {node: '>= 0.4'} + dev: false + + /has-symbols/1.0.3: + resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} + engines: {node: '>= 0.4'} + dev: false + + /has/1.0.3: + resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} + engines: {node: '>= 0.4.0'} + dependencies: + function-bind: 1.1.1 + dev: false + + /hoist-non-react-statics/3.3.2: + resolution: {integrity: sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==} + dependencies: + react-is: 16.13.1 + dev: false + + /html-encoding-sniffer/3.0.0: + resolution: {integrity: sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==} + engines: {node: '>=12'} + dependencies: + whatwg-encoding: 2.0.0 + dev: true + + /http-errors/2.0.0: + resolution: {integrity: sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==} + engines: {node: '>= 0.8'} + dependencies: + depd: 2.0.0 + inherits: 2.0.4 + setprototypeof: 1.2.0 + statuses: 2.0.1 + toidentifier: 1.0.1 + dev: false + + /http-proxy-agent/5.0.0: + resolution: {integrity: sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==} + engines: {node: '>= 6'} + dependencies: + '@tootallnate/once': 2.0.0 + agent-base: 6.0.2 + debug: 4.3.4 + transitivePeerDependencies: + - supports-color + dev: true + + /https-proxy-agent/5.0.1: + resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} + engines: {node: '>= 6'} + dependencies: + agent-base: 6.0.2 + debug: 4.3.4 + transitivePeerDependencies: + - supports-color + dev: true + + /iconv-lite/0.4.24: + resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} + engines: {node: '>=0.10.0'} + dependencies: + safer-buffer: 2.1.2 + dev: false + + /iconv-lite/0.6.3: + resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} + engines: {node: '>=0.10.0'} + dependencies: + safer-buffer: 2.1.2 + dev: true + + /import-fresh/3.3.0: + resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} + engines: {node: '>=6'} + dependencies: + parent-module: 1.0.1 + resolve-from: 4.0.0 + dev: false + + /inherits/2.0.4: + resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + dev: false + + /ipaddr.js/1.9.1: + resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==} + engines: {node: '>= 0.10'} + dev: false + + /is-arrayish/0.2.1: + resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} + dev: false + + /is-binary-path/2.1.0: + resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} + engines: {node: '>=8'} + dependencies: + binary-extensions: 2.2.0 + dev: true + + /is-core-module/2.13.0: + resolution: {integrity: sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==} + dependencies: + has: 1.0.3 + dev: false + + /is-extglob/2.1.1: + resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} + engines: {node: '>=0.10.0'} + dev: true + + /is-glob/4.0.3: + resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} + engines: {node: '>=0.10.0'} + dependencies: + is-extglob: 2.1.1 + dev: true + + /is-number/7.0.0: + resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} + engines: {node: '>=0.12.0'} + dev: true + + /is-potential-custom-element-name/1.0.1: + resolution: {integrity: sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==} + dev: true + + /js-string-escape/1.0.1: + resolution: {integrity: sha512-Smw4xcfIQ5LVjAOuJCvN/zIodzA/BBSsluuoSykP+lUvScIi4U6RJLfwHet5cxFnCswUjISV8oAXaqaJDY3chg==} + engines: {node: '>= 0.8'} + dev: true + + /js-tokens/4.0.0: + resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + dev: false + + /jsdom/21.1.2: + resolution: {integrity: sha512-sCpFmK2jv+1sjff4u7fzft+pUh2KSUbUrEHYHyfSIbGTIcmnjyp83qg6qLwdJ/I3LpTXx33ACxeRL7Lsyc6lGQ==} + engines: {node: '>=14'} + peerDependencies: + canvas: ^2.5.0 + peerDependenciesMeta: + canvas: + optional: true + dependencies: + abab: 2.0.6 + acorn: 8.10.0 + acorn-globals: 7.0.1 + cssstyle: 3.0.0 + data-urls: 4.0.0 + decimal.js: 10.4.3 + domexception: 4.0.0 + escodegen: 2.1.0 + form-data: 4.0.0 + html-encoding-sniffer: 3.0.0 + http-proxy-agent: 5.0.0 + https-proxy-agent: 5.0.1 + is-potential-custom-element-name: 1.0.1 + nwsapi: 2.2.7 + parse5: 7.1.2 + rrweb-cssom: 0.6.0 + saxes: 6.0.0 + symbol-tree: 3.2.4 + tough-cookie: 4.1.3 + w3c-xmlserializer: 4.0.0 + webidl-conversions: 7.0.0 + whatwg-encoding: 2.0.0 + whatwg-mimetype: 3.0.0 + whatwg-url: 12.0.1 + ws: 8.13.0 + xml-name-validator: 4.0.0 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + dev: true + + /json-parse-even-better-errors/2.3.1: + resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} + dev: false + + /jsonc-parser/3.2.0: + resolution: {integrity: sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==} + dev: true + + /lines-and-columns/1.2.4: + resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} + dev: false + + /local-pkg/0.4.3: + resolution: {integrity: sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g==} + engines: {node: '>=14'} + dev: true + + /lodash/4.17.21: + resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} + dev: true + + /loose-envify/1.4.0: + resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} + hasBin: true + dependencies: + js-tokens: 4.0.0 + dev: false + + /loupe/2.3.6: + resolution: {integrity: sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==} + dependencies: + get-func-name: 2.0.0 + dev: true + + /lru-cache/6.0.0: + resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} + engines: {node: '>=10'} + dependencies: + yallist: 4.0.0 + dev: true + + /magic-string/0.30.2: + resolution: {integrity: sha512-lNZdu7pewtq/ZvWUp9Wpf/x7WzMTsR26TWV03BRZrXFsv+BI6dy8RAiKgm1uM/kyR0rCfUcqvOlXKG66KhIGug==} + engines: {node: '>=12'} + dependencies: + '@jridgewell/sourcemap-codec': 1.4.15 + dev: true + + /md5-hex/3.0.1: + resolution: {integrity: sha512-BUiRtTtV39LIJwinWBjqVsU9xhdnz7/i889V859IBFpuqGAj6LuOvHv5XLbgZ2R7ptJoJaEcxkv88/h25T7Ciw==} + engines: {node: '>=8'} + dependencies: + blueimp-md5: 2.19.0 + dev: true + + /media-typer/0.3.0: + resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==} + engines: {node: '>= 0.6'} + dev: false + + /memoize-one/6.0.0: + resolution: {integrity: sha512-rkpe71W0N0c0Xz6QD0eJETuWAJGnJ9afsl1srmwPrI+yBCkge5EycXXbYRyvL29zZVUWQCY7InPRCv3GDXuZNw==} + dev: false + + /merge-descriptors/1.0.1: + resolution: {integrity: sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==} + dev: false + + /merge2/1.4.1: + resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} + engines: {node: '>= 8'} + dev: true + + /methods/1.1.2: + resolution: {integrity: sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==} + engines: {node: '>= 0.6'} + dev: false + + /micromatch/4.0.5: + resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} + engines: {node: '>=8.6'} + dependencies: + braces: 3.0.2 + picomatch: 2.3.1 + dev: true + + /mime-db/1.52.0: + resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} + engines: {node: '>= 0.6'} + + /mime-types/2.1.35: + resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} + engines: {node: '>= 0.6'} + dependencies: + mime-db: 1.52.0 + + /mime/1.6.0: + resolution: {integrity: sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==} + engines: {node: '>=4'} + hasBin: true + dev: false + + /mlly/1.4.0: + resolution: {integrity: sha512-ua8PAThnTwpprIaU47EPeZ/bPUVp2QYBbWMphUQpVdBI3Lgqzm5KZQ45Agm3YJedHXaIHl6pBGabaLSUPPSptg==} + dependencies: + acorn: 8.10.0 + pathe: 1.1.1 + pkg-types: 1.0.3 + ufo: 1.2.0 + dev: true + + /ms/2.0.0: + resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} + dev: false + + /ms/2.1.2: + resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} + dev: true + + /ms/2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + dev: false + + /nanoid/3.3.6: + resolution: {integrity: sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + dev: true + + /negotiator/0.6.3: + resolution: {integrity: sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==} + engines: {node: '>= 0.6'} + dev: false + + /node-fetch/2.6.12: + resolution: {integrity: sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g==} + engines: {node: 4.x || >=6.0.0} + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + dependencies: + whatwg-url: 5.0.0 + dev: true + + /normalize-path/3.0.0: + resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} + engines: {node: '>=0.10.0'} + dev: true + + /nwsapi/2.2.7: + resolution: {integrity: sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==} + dev: true + + /object-assign/4.1.1: + resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} + engines: {node: '>=0.10.0'} + dev: false + + /object-inspect/1.12.3: + resolution: {integrity: sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==} + dev: false + + /on-finished/2.4.1: + resolution: {integrity: sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==} + engines: {node: '>= 0.8'} + dependencies: + ee-first: 1.1.1 + dev: false + + /p-limit/4.0.0: + resolution: {integrity: sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dependencies: + yocto-queue: 1.0.0 + dev: true + + /parent-module/1.0.1: + resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} + engines: {node: '>=6'} + dependencies: + callsites: 3.1.0 + dev: false + + /parse-json/5.2.0: + resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} + engines: {node: '>=8'} + dependencies: + '@babel/code-frame': 7.22.10 + error-ex: 1.3.2 + json-parse-even-better-errors: 2.3.1 + lines-and-columns: 1.2.4 + dev: false + + /parse5/7.1.2: + resolution: {integrity: sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==} + dependencies: + entities: 4.5.0 + dev: true + + /parseurl/1.3.3: + resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==} + engines: {node: '>= 0.8'} + dev: false + + /path-parse/1.0.7: + resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} + dev: false + + /path-to-regexp/0.1.7: + resolution: {integrity: sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==} + dev: false + + /path-type/4.0.0: + resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} + engines: {node: '>=8'} + dev: false + + /pathe/1.1.1: + resolution: {integrity: sha512-d+RQGp0MAYTIaDBIMmOfMwz3E+LOZnxx1HZd5R18mmCZY0QBlK0LDZfPc8FW8Ed2DlvsuE6PRjroDY+wg4+j/Q==} + dev: true + + /pathval/1.1.1: + resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==} + dev: true + + /picocolors/1.0.0: + resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} + dev: true + + /picomatch/2.3.1: + resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} + engines: {node: '>=8.6'} + dev: true + + /pkg-types/1.0.3: + resolution: {integrity: sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==} + dependencies: + jsonc-parser: 3.2.0 + mlly: 1.4.0 + pathe: 1.1.1 + dev: true + + /postcss/8.4.27: + resolution: {integrity: sha512-gY/ACJtJPSmUFPDCHtX78+01fHa64FaU4zaaWfuh1MhGJISufJAH4cun6k/8fwsHYeK4UQmENQK+tRLCFJE8JQ==} + engines: {node: ^10 || ^12 || >=14} + dependencies: + nanoid: 3.3.6 + picocolors: 1.0.0 + source-map-js: 1.0.2 + dev: true + + /prettier/2.8.8: + resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} + engines: {node: '>=10.13.0'} + hasBin: true + dev: true + + /pretty-format/27.5.1: + resolution: {integrity: sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==} + engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + dependencies: + ansi-regex: 5.0.1 + ansi-styles: 5.2.0 + react-is: 17.0.2 + dev: true + + /prop-types/15.8.1: + resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} + dependencies: + loose-envify: 1.4.0 + object-assign: 4.1.1 + react-is: 16.13.1 + dev: false + + /proxy-addr/2.0.7: + resolution: {integrity: sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==} + engines: {node: '>= 0.10'} + dependencies: + forwarded: 0.2.0 + ipaddr.js: 1.9.1 + dev: false + + /psl/1.9.0: + resolution: {integrity: sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==} + dev: true + + /punycode/2.3.0: + resolution: {integrity: sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==} + engines: {node: '>=6'} + dev: true + + /qs/6.11.0: + resolution: {integrity: sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==} + engines: {node: '>=0.6'} + dependencies: + side-channel: 1.0.4 + dev: false + + /querystringify/2.2.0: + resolution: {integrity: sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==} + dev: true + + /queue-microtask/1.2.3: + resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} + dev: true + + /range-parser/1.2.1: + resolution: {integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==} + engines: {node: '>= 0.6'} + dev: false + + /raw-body/2.5.1: + resolution: {integrity: sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==} + engines: {node: '>= 0.8'} + dependencies: + bytes: 3.1.2 + http-errors: 2.0.0 + iconv-lite: 0.4.24 + unpipe: 1.0.0 + dev: false + + /react-dom/18.2.0_react@18.2.0: + resolution: {integrity: sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==} + peerDependencies: + react: ^18.2.0 + dependencies: + loose-envify: 1.4.0 + react: 18.2.0 + scheduler: 0.23.0 + dev: false + + /react-hook-form/7.45.4_react@18.2.0: + resolution: {integrity: sha512-HGDV1JOOBPZj10LB3+OZgfDBTn+IeEsNOKiq/cxbQAIbKaiJUe/KV8DBUzsx0Gx/7IG/orWqRRm736JwOfUSWQ==} + engines: {node: '>=12.22.0'} + peerDependencies: + react: ^16.8.0 || ^17 || ^18 + dependencies: + react: 18.2.0 + dev: false + + /react-is/16.13.1: + resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} + dev: false + + /react-is/17.0.2: + resolution: {integrity: sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==} + dev: true + + /react-select/5.7.4_qflmzdebv2ewfrqz6op6ohcc2q: + resolution: {integrity: sha512-NhuE56X+p9QDFh4BgeygHFIvJJszO1i1KSkg/JPcIJrbovyRtI+GuOEa4XzFCEpZRAEoEI8u/cAHK+jG/PgUzQ==} + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + dependencies: + '@babel/runtime': 7.22.10 + '@emotion/cache': 11.11.0 + '@emotion/react': 11.11.1_j3ahe22lw6ac2w6qvqp4kjqnqy + '@floating-ui/dom': 1.5.1 + '@types/react-transition-group': 4.4.6 + memoize-one: 6.0.0 + prop-types: 15.8.1 + react: 18.2.0 + react-dom: 18.2.0_react@18.2.0 + react-transition-group: 4.4.5_biqbaboplfbrettd7655fr4n2y + use-isomorphic-layout-effect: 1.1.2_j3ahe22lw6ac2w6qvqp4kjqnqy + transitivePeerDependencies: + - '@types/react' + dev: false + + /react-transition-group/4.4.5_biqbaboplfbrettd7655fr4n2y: + resolution: {integrity: sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g==} + peerDependencies: + react: '>=16.6.0' + react-dom: '>=16.6.0' + dependencies: + '@babel/runtime': 7.22.10 + dom-helpers: 5.2.1 + loose-envify: 1.4.0 + prop-types: 15.8.1 + react: 18.2.0 + react-dom: 18.2.0_react@18.2.0 + dev: false + + /react/18.2.0: + resolution: {integrity: sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==} + engines: {node: '>=0.10.0'} + dependencies: + loose-envify: 1.4.0 + dev: false + + /readdirp/3.6.0: + resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} + engines: {node: '>=8.10.0'} + dependencies: + picomatch: 2.3.1 + dev: true + + /regenerator-runtime/0.14.0: + resolution: {integrity: sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==} + dev: false + + /requires-port/1.0.0: + resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==} + dev: true + + /resolve-from/4.0.0: + resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} + engines: {node: '>=4'} + dev: false + + /resolve/1.22.4: + resolution: {integrity: sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg==} + hasBin: true + dependencies: + is-core-module: 2.13.0 + path-parse: 1.0.7 + supports-preserve-symlinks-flag: 1.0.0 + dev: false + + /reusify/1.0.4: + resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} + engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + dev: true + + /rollup/3.28.0: + resolution: {integrity: sha512-d7zhvo1OUY2SXSM6pfNjgD5+d0Nz87CUp4mt8l/GgVP3oBsPwzNvSzyu1me6BSG9JIgWNTVcafIXBIyM8yQ3yw==} + engines: {node: '>=14.18.0', npm: '>=8.0.0'} + hasBin: true + optionalDependencies: + fsevents: 2.3.2 + dev: true + + /rrweb-cssom/0.6.0: + resolution: {integrity: sha512-APM0Gt1KoXBz0iIkkdB/kfvGOwC4UuJFeG/c+yV7wSc7q96cG/kJ0HiYCnzivD9SB53cLV1MlHFNfOuPaadYSw==} + dev: true + + /run-parallel/1.2.0: + resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} + dependencies: + queue-microtask: 1.2.3 + dev: true + + /safe-buffer/5.2.1: + resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + dev: false + + /safer-buffer/2.1.2: + resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} + + /saxes/6.0.0: + resolution: {integrity: sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==} + engines: {node: '>=v12.22.7'} + dependencies: + xmlchars: 2.2.0 + dev: true + + /scheduler/0.23.0: + resolution: {integrity: sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==} + dependencies: + loose-envify: 1.4.0 + dev: false + + /semver/7.5.4: + resolution: {integrity: sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==} + engines: {node: '>=10'} + hasBin: true + dependencies: + lru-cache: 6.0.0 + dev: true + + /send/0.18.0: + resolution: {integrity: sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==} + engines: {node: '>= 0.8.0'} + dependencies: + debug: 2.6.9 + depd: 2.0.0 + destroy: 1.2.0 + encodeurl: 1.0.2 + escape-html: 1.0.3 + etag: 1.8.1 + fresh: 0.5.2 + http-errors: 2.0.0 + mime: 1.6.0 + ms: 2.1.3 + on-finished: 2.4.1 + range-parser: 1.2.1 + statuses: 2.0.1 + transitivePeerDependencies: + - supports-color + dev: false + + /serve-static/1.15.0: + resolution: {integrity: sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==} + engines: {node: '>= 0.8.0'} + dependencies: + encodeurl: 1.0.2 + escape-html: 1.0.3 + parseurl: 1.3.3 + send: 0.18.0 + transitivePeerDependencies: + - supports-color + dev: false + + /setprototypeof/1.2.0: + resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==} + dev: false + + /side-channel/1.0.4: + resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==} + dependencies: + call-bind: 1.0.2 + get-intrinsic: 1.2.1 + object-inspect: 1.12.3 + dev: false + + /siginfo/2.0.0: + resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} + dev: true + + /source-map-js/1.0.2: + resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} + engines: {node: '>=0.10.0'} + dev: true + + /source-map/0.5.7: + resolution: {integrity: sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==} + engines: {node: '>=0.10.0'} + dev: false + + /source-map/0.6.1: + resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} + engines: {node: '>=0.10.0'} + requiresBuild: true + dev: true + optional: true + + /stackback/0.0.2: + resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} + dev: true + + /statuses/2.0.1: + resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==} + engines: {node: '>= 0.8'} + dev: false + + /std-env/3.3.3: + resolution: {integrity: sha512-Rz6yejtVyWnVjC1RFvNmYL10kgjC49EOghxWn0RFqlCHGFpQx+Xe7yW3I4ceK1SGrWIGMjD5Kbue8W/udkbMJg==} + dev: true + + /strip-literal/1.3.0: + resolution: {integrity: sha512-PugKzOsyXpArk0yWmUwqOZecSO0GH0bPoctLcqNDH9J04pVW3lflYE0ujElBGTloevcxF5MofAOZ7C5l2b+wLg==} + dependencies: + acorn: 8.10.0 + dev: true + + /stylis/4.2.0: + resolution: {integrity: sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw==} + dev: false + + /supports-color/5.5.0: + resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} + engines: {node: '>=4'} + dependencies: + has-flag: 3.0.0 + dev: false + + /supports-preserve-symlinks-flag/1.0.0: + resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} + engines: {node: '>= 0.4'} + dev: false + + /symbol-tree/3.2.4: + resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==} + dev: true + + /time-zone/1.0.0: + resolution: {integrity: sha512-TIsDdtKo6+XrPtiTm1ssmMngN1sAhyKnTO2kunQWqNPWIVvCm15Wmw4SWInwTVgJ5u/Tr04+8Ei9TNcw4x4ONA==} + engines: {node: '>=4'} + dev: true + + /tinybench/2.5.0: + resolution: {integrity: sha512-kRwSG8Zx4tjF9ZiyH4bhaebu+EDz1BOx9hOigYHlUW4xxI/wKIUQUqo018UlU4ar6ATPBsaMrdbKZ+tmPdohFA==} + dev: true + + /tinypool/0.5.0: + resolution: {integrity: sha512-paHQtnrlS1QZYKF/GnLoOM/DN9fqaGOFbCbxzAhwniySnzl9Ebk8w73/dd34DAhe/obUbPAOldTyYXQZxnPBPQ==} + engines: {node: '>=14.0.0'} + dev: true + + /tinyspy/2.1.1: + resolution: {integrity: sha512-XPJL2uSzcOyBMky6OFrusqWlzfFrXtE0hPuMgW8A2HmaqrPo4ZQHRN/V0QXN3FSjKxpsbRrFc5LI7KOwBsT1/w==} + engines: {node: '>=14.0.0'} + dev: true + + /to-fast-properties/2.0.0: + resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} + engines: {node: '>=4'} + dev: false + + /to-regex-range/5.0.1: + resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} + engines: {node: '>=8.0'} + dependencies: + is-number: 7.0.0 + dev: true + + /toidentifier/1.0.1: + resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==} + engines: {node: '>=0.6'} + dev: false + + /tough-cookie/4.1.3: + resolution: {integrity: sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==} + engines: {node: '>=6'} + dependencies: + psl: 1.9.0 + punycode: 2.3.0 + universalify: 0.2.0 + url-parse: 1.5.10 + dev: true + + /tr46/0.0.3: + resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} + dev: true + + /tr46/4.1.1: + resolution: {integrity: sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==} + engines: {node: '>=14'} + dependencies: + punycode: 2.3.0 + dev: true + + /tsconfck/2.1.2_typescript@5.1.6: + resolution: {integrity: sha512-ghqN1b0puy3MhhviwO2kGF8SeMDNhEbnKxjK7h6+fvY9JAxqvXi8y5NAHSQv687OVboS2uZIByzGd45/YxrRHg==} + engines: {node: ^14.13.1 || ^16 || >=18} + hasBin: true + peerDependencies: + typescript: ^4.3.5 || ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true + dependencies: + typescript: 5.1.6 + dev: true + + /type-detect/4.0.8: + resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} + engines: {node: '>=4'} + dev: true + + /type-is/1.6.18: + resolution: {integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==} + engines: {node: '>= 0.6'} + dependencies: + media-typer: 0.3.0 + mime-types: 2.1.35 + dev: false + + /typescript/5.1.6: + resolution: {integrity: sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==} + engines: {node: '>=14.17'} + hasBin: true + dev: true + + /ufo/1.2.0: + resolution: {integrity: sha512-RsPyTbqORDNDxqAdQPQBpgqhWle1VcTSou/FraClYlHf6TZnQcGslpLcAphNR+sQW4q5lLWLbOsRlh9j24baQg==} + dev: true + + /universalify/0.2.0: + resolution: {integrity: sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==} + engines: {node: '>= 4.0.0'} + dev: true + + /unpipe/1.0.0: + resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==} + engines: {node: '>= 0.8'} + dev: false + + /url-parse/1.5.10: + resolution: {integrity: sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==} + dependencies: + querystringify: 2.2.0 + requires-port: 1.0.0 + dev: true + + /use-isomorphic-layout-effect/1.1.2_j3ahe22lw6ac2w6qvqp4kjqnqy: + resolution: {integrity: sha512-49L8yCO3iGT/ZF9QttjwLF/ZD9Iwto5LnH5LmEdk/6cFmXddqi2ulF0edxTwjj+7mqvpVVGQWvbXZdn32wRSHA==} + peerDependencies: + '@types/react': '*' + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + '@types/react': + optional: true + dependencies: + '@types/react': 18.2.20 + react: 18.2.0 + dev: false + + /use-sync-external-store/1.2.0_react@18.2.0: + resolution: {integrity: sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==} + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + dependencies: + react: 18.2.0 + dev: false + + /utils-merge/1.0.1: + resolution: {integrity: sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==} + engines: {node: '>= 0.4.0'} + dev: false + + /vary/1.1.2: + resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} + engines: {node: '>= 0.8'} + dev: false + + /vite-node/0.31.4_@types+node@20.5.0: + resolution: {integrity: sha512-uzL377GjJtTbuc5KQxVbDu2xfU/x0wVjUtXQR2ihS21q/NK6ROr4oG0rsSkBBddZUVCwzfx22in76/0ZZHXgkQ==} + engines: {node: '>=v14.18.0'} + hasBin: true + dependencies: + cac: 6.7.14 + debug: 4.3.4 + mlly: 1.4.0 + pathe: 1.1.1 + picocolors: 1.0.0 + vite: 4.4.9_@types+node@20.5.0 + transitivePeerDependencies: + - '@types/node' + - less + - lightningcss + - sass + - stylus + - sugarss + - supports-color + - terser + dev: true + + /vite-tsconfig-paths/4.2.0_typescript@5.1.6: + resolution: {integrity: sha512-jGpus0eUy5qbbMVGiTxCL1iB9ZGN6Bd37VGLJU39kTDD6ZfULTTb1bcc5IeTWqWJKiWV5YihCaibeASPiGi8kw==} + peerDependencies: + vite: '*' + peerDependenciesMeta: + vite: + optional: true + dependencies: + debug: 4.3.4 + globrex: 0.1.2 + tsconfck: 2.1.2_typescript@5.1.6 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + + /vite/4.4.9_@types+node@20.5.0: + resolution: {integrity: sha512-2mbUn2LlUmNASWwSCNSJ/EG2HuSRTnVNaydp6vMCm5VIqJsjMfbIWtbH2kDuwUVW5mMUKKZvGPX/rqeqVvv1XA==} + engines: {node: ^14.18.0 || >=16.0.0} + hasBin: true + peerDependencies: + '@types/node': '>= 14' + less: '*' + lightningcss: ^1.21.0 + sass: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + dependencies: + '@types/node': 20.5.0 + esbuild: 0.18.20 + postcss: 8.4.27 + rollup: 3.28.0 + optionalDependencies: + fsevents: 2.3.2 + dev: true + + /vitest/0.31.4_jsdom@21.1.2: + resolution: {integrity: sha512-GoV0VQPmWrUFOZSg3RpQAPN+LPmHg2/gxlMNJlyxJihkz6qReHDV6b0pPDcqFLNEPya4tWJ1pgwUNP9MLmUfvQ==} + engines: {node: '>=v14.18.0'} + hasBin: true + peerDependencies: + '@edge-runtime/vm': '*' + '@vitest/browser': '*' + '@vitest/ui': '*' + happy-dom: '*' + jsdom: '*' + playwright: '*' + safaridriver: '*' + webdriverio: '*' + peerDependenciesMeta: + '@edge-runtime/vm': + optional: true + '@vitest/browser': + optional: true + '@vitest/ui': + optional: true + happy-dom: + optional: true + jsdom: + optional: true + playwright: + optional: true + safaridriver: + optional: true + webdriverio: + optional: true + dependencies: + '@types/chai': 4.3.5 + '@types/chai-subset': 1.3.3 + '@types/node': 20.5.0 + '@vitest/expect': 0.31.4 + '@vitest/runner': 0.31.4 + '@vitest/snapshot': 0.31.4 + '@vitest/spy': 0.31.4 + '@vitest/utils': 0.31.4 + acorn: 8.10.0 + acorn-walk: 8.2.0 + cac: 6.7.14 + chai: 4.3.7 + concordance: 5.0.4 + debug: 4.3.4 + jsdom: 21.1.2 + local-pkg: 0.4.3 + magic-string: 0.30.2 + pathe: 1.1.1 + picocolors: 1.0.0 + std-env: 3.3.3 + strip-literal: 1.3.0 + tinybench: 2.5.0 + tinypool: 0.5.0 + vite: 4.4.9_@types+node@20.5.0 + vite-node: 0.31.4_@types+node@20.5.0 + why-is-node-running: 2.2.2 + transitivePeerDependencies: + - less + - lightningcss + - sass + - stylus + - sugarss + - supports-color + - terser + dev: true + + /w3c-xmlserializer/4.0.0: + resolution: {integrity: sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw==} + engines: {node: '>=14'} + dependencies: + xml-name-validator: 4.0.0 + dev: true + + /webidl-conversions/3.0.1: + resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} + dev: true + + /webidl-conversions/7.0.0: + resolution: {integrity: sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==} + engines: {node: '>=12'} + dev: true + + /well-known-symbols/2.0.0: + resolution: {integrity: sha512-ZMjC3ho+KXo0BfJb7JgtQ5IBuvnShdlACNkKkdsqBmYw3bPAaJfPeYUo6tLUaT5tG/Gkh7xkpBhKRQ9e7pyg9Q==} + engines: {node: '>=6'} + dev: true + + /whatwg-encoding/2.0.0: + resolution: {integrity: sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==} + engines: {node: '>=12'} + dependencies: + iconv-lite: 0.6.3 + dev: true + + /whatwg-mimetype/3.0.0: + resolution: {integrity: sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==} + engines: {node: '>=12'} + dev: true + + /whatwg-url/12.0.1: + resolution: {integrity: sha512-Ed/LrqB8EPlGxjS+TrsXcpUond1mhccS3pchLhzSgPCnTimUCKj3IZE75pAs5m6heB2U2TMerKFUXheyHY+VDQ==} + engines: {node: '>=14'} + dependencies: + tr46: 4.1.1 + webidl-conversions: 7.0.0 + dev: true + + /whatwg-url/5.0.0: + resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} + dependencies: + tr46: 0.0.3 + webidl-conversions: 3.0.1 + dev: true + + /why-is-node-running/2.2.2: + resolution: {integrity: sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA==} + engines: {node: '>=8'} + hasBin: true + dependencies: + siginfo: 2.0.0 + stackback: 0.0.2 + dev: true + + /ws/8.13.0: + resolution: {integrity: sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==} + engines: {node: '>=10.0.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: '>=5.0.2' + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + dev: true + + /xml-name-validator/4.0.0: + resolution: {integrity: sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==} + engines: {node: '>=12'} + dev: true + + /xmlchars/2.2.0: + resolution: {integrity: sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==} + dev: true + + /yallist/4.0.0: + resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} + dev: true + + /yaml/1.10.2: + resolution: {integrity: sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==} + engines: {node: '>= 6'} + dev: false + + /yocto-queue/1.0.0: + resolution: {integrity: sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==} + engines: {node: '>=12.20'} + dev: true + + /zod/3.22.0: + resolution: {integrity: sha512-y5KZY/ssf5n7hCGDGGtcJO/EBJEm5Pa+QQvFBeyMOtnFYOSflalxIFFvdaYevPhePcmcKC4aTbFkCcXN7D0O8Q==} + dev: false diff --git a/scripts/setup.ts b/scripts/setup.ts new file mode 100644 index 0000000..354d20d --- /dev/null +++ b/scripts/setup.ts @@ -0,0 +1,3 @@ +import { fetch } from "cross-fetch"; + +global.fetch = fetch; diff --git a/scripts/tests/__snapshots__/all.test.ts.snap b/scripts/tests/__snapshots__/all.test.ts.snap new file mode 100644 index 0000000..a1f75ec --- /dev/null +++ b/scripts/tests/__snapshots__/all.test.ts.snap @@ -0,0 +1,1287 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`tsc > Should have the correct TypeScript errors 1`] = ` +",src/01-introduction/03-navigating-jsx-types.problem.tsx(5,21): error TS17000: JSX attributes must only be assigned a non-empty 'expression'. +src/02-components/04-typing-components.problem.tsx(4,29): error TS18046: 'props' is of type 'unknown'. +src/02-components/04-typing-components.problem.tsx(10,8): error TS2578: Unused '@ts-expect-error' directive. +src/02-components/04-typing-components.problem.tsx(13,15): error TS2322: Type '{ className: string; }' is not assignable to type 'IntrinsicAttributes'. + Property 'className' does not exist on type 'IntrinsicAttributes'. +src/02-components/05-typing-components-as-functions.problem.tsx(7,1): error TS2578: Unused '@ts-expect-error' directive. +src/02-components/05-typing-components-as-functions.problem.tsx(17,8): error TS2786: 'Button' cannot be used as a JSX component. + Its type '(props: Props) => { ohDear: string; }' is not a valid JSX element type. + Type '(props: Props) => { ohDear: string; }' is not assignable to type '(props: any, deprecatedLegacyContext?: any) => ReactNode'. + Type '{ ohDear: string; }' is not assignable to type 'ReactNode'. +src/02-components/06-typing-children.problem.tsx(4,25): error TS2339: Property 'children' does not exist on type '{}'. +src/02-components/06-typing-children.problem.tsx(10,8): error TS2578: Unused '@ts-expect-error' directive. +src/02-components/06-typing-children.problem.tsx(12,8): error TS2559: Type '{ children: string; }' has no properties in common with type 'IntrinsicAttributes'. +src/02-components/07-typing-onclick-handlers.problem.tsx(8,47): error TS2339: Property 'onClick' does not exist on type 'ButtonProps'. +src/02-components/08-using-html-props.problem.tsx(3,26): error TS2339: Property 'className' does not exist on type '{}'. +src/02-components/08-using-html-props.problem.tsx(10,18): error TS2322: Type '{ onClick: () => void; type: string; }' is not assignable to type 'IntrinsicAttributes'. + Property 'onClick' does not exist on type 'IntrinsicAttributes'. +src/02-components/09-html-props-with-one-changed.problem.tsx(23,28): error TS2344: Type 'false' does not satisfy the constraint 'true'. +src/02-components/10-extracting-props-from-custom-components.problem.tsx(18,3): error TS2344: Type 'false' does not satisfy the constraint 'true'. +src/03-hooks/11-use-state.problem.tsx(8,30): error TS2339: Property 'id' does not exist on type 'never'. +src/03-hooks/11-use-state.problem.tsx(8,39): error TS2339: Property 'value' does not exist on type 'never'. +src/03-hooks/11-use-state.problem.tsx(13,13): error TS2322: Type '{ id: number; value: string; }' is not assignable to type 'never'. +src/03-hooks/11-use-state.problem.tsx(14,13): error TS2322: Type '{ id: number; value: string; }' is not assignable to type 'never'. +src/03-hooks/12-use-state-with-undefined.problem.ts(18,15): error TS2345: Argument of type '{ id: number; name: string; }' is not assignable to parameter of type 'SetStateAction'. + Type '{ id: number; name: string; }' provides no match for the signature '(prevState: undefined): undefined'. +src/03-hooks/12-use-state-with-undefined.problem.ts(22,23): error TS2344: Type 'false' does not satisfy the constraint 'true'. +src/03-hooks/13-use-state-excess-properties.problem.tsx(22,17): error TS2578: Unused '@ts-expect-error' directive. +src/03-hooks/13-use-state-excess-properties.problem.tsx(40,17): error TS2578: Unused '@ts-expect-error' directive. +src/03-hooks/14-use-effect.problem.ts(6,7): error TS2322: Type 'Timeout' is not assignable to type 'void | Destructor'. +src/03-hooks/15-use-callback.problem.tsx(5,31): error TS2344: Type 'string' does not satisfy the constraint 'Function'. +src/03-hooks/15-use-callback.problem.tsx(6,6): error TS7006: Parameter 'buttonName' implicitly has an 'any' type. +src/03-hooks/15-use-callback.problem.tsx(12,22): error TS2344: Type 'false' does not satisfy the constraint 'true'. +src/03-hooks/15-use-callback.problem.tsx(16,30): error TS2349: This expression is not callable. + Type 'String' has no call signatures. +src/03-hooks/15-use-callback.problem.tsx(17,30): error TS2349: This expression is not callable. + Type 'String' has no call signatures. +src/03-hooks/15-use-callback.problem.tsx(18,30): error TS2349: This expression is not callable. + Type 'String' has no call signatures. +src/03-hooks/16-use-memo.problem.tsx(5,52): error TS2345: Argument of type '() => string[]' is not assignable to parameter of type '() => () => string[]'. + Type 'string[]' is not assignable to type '() => string[]'. + Type 'string[]' provides no match for the signature '(): string[]'. +src/03-hooks/16-use-memo.problem.tsx(12,22): error TS2344: Type 'false' does not satisfy the constraint 'true'. +src/03-hooks/17-use-ref-basics.problem.tsx(7,5): error TS2322: Type '\\"Random value!\\"' is not assignable to type 'undefined'. +src/03-hooks/18-element-refs.explainer.tsx(19,7): error TS2322: Type 'undefined' is not assignable to type 'HTMLDivElement | null'. +src/03-hooks/19-use-ref-with-elements.problem.tsx(6,15): error TS2322: Type 'MutableRefObject' is not assignable to type 'LegacyRef | undefined'. + Type 'MutableRefObject' is not assignable to type 'RefObject'. + Types of property 'current' are incompatible. + Type 'HTMLDivElement | undefined' is not assignable to type 'HTMLDivElement | null'. + Type 'undefined' is not assignable to type 'HTMLDivElement | null'. +src/03-hooks/20-why-is-my-ref-readonly.problem.tsx(7,7): error TS2540: Cannot assign to 'current' because it is a read-only property. +src/03-hooks/20-why-is-my-ref-readonly.solution.tsx(10,18): error TS2540: Cannot assign to 'current' because it is a read-only property. +src/03-hooks/21-use-reducer.problem.ts(5,11): error TS18046: 'action' is of type 'unknown'. +src/03-hooks/21-use-reducer.problem.ts(7,23): error TS18046: 'state' is of type 'unknown'. +src/03-hooks/21-use-reducer.problem.ts(7,37): error TS18046: 'action' is of type 'unknown'. +src/03-hooks/21-use-reducer.problem.ts(9,23): error TS18046: 'state' is of type 'unknown'. +src/03-hooks/21-use-reducer.problem.ts(9,37): error TS18046: 'action' is of type 'unknown'. +src/03-hooks/21-use-reducer.problem.ts(21,1): error TS2578: Unused '@ts-expect-error' directive. +src/03-hooks/21-use-reducer.problem.ts(24,1): error TS2578: Unused '@ts-expect-error' directive. +src/03-hooks/21-use-reducer.problem.ts(27,1): error TS2578: Unused '@ts-expect-error' directive. +src/04-advanced-props/22-discriminated-union-props.problem.tsx(34,9): error TS2578: Unused '@ts-expect-error' directive. +src/04-advanced-props/23-destructuring-discriminated-unions.problem.tsx(19,34): error TS2339: Property 'title' does not exist on type 'ModalProps'. +src/04-advanced-props/23-destructuring-discriminated-unions.solution.1.tsx(18,31): error TS2339: Property 'title' does not exist on type '{} | { title: string; }'. + Property 'title' does not exist on type '{}'. +src/04-advanced-props/24-discriminated-union-with-other-props.problem.tsx(21,36): error TS2339: Property 'buttonColor' does not exist on type '{ variant: \\"no-title\\"; }'. +src/04-advanced-props/24-discriminated-union-with-other-props.problem.tsx(34,36): error TS2339: Property 'buttonColor' does not exist on type '{ variant: \\"title\\"; title: string; }'. +src/04-advanced-props/24-discriminated-union-with-other-props.problem.tsx(50,9): error TS2322: Type '{ buttonColor: string; variant: \\"no-title\\"; title: string; }' is not assignable to type 'IntrinsicAttributes & ModalProps'. + Property 'buttonColor' does not exist on type 'IntrinsicAttributes & { variant: \\"no-title\\"; }'. +src/04-advanced-props/24-discriminated-union-with-other-props.problem.tsx(52,9): error TS2578: Unused '@ts-expect-error' directive. +src/04-advanced-props/24-discriminated-union-with-other-props.problem.tsx(55,44): error TS2322: Type '{ variant: \\"title\\"; title: string; buttonColor: string; }' is not assignable to type 'IntrinsicAttributes & ModalProps'. + Property 'buttonColor' does not exist on type 'IntrinsicAttributes & { variant: \\"title\\"; title: string; }'. +src/04-advanced-props/25-toggle-props.problem.tsx(38,5): error TS2578: Unused '@ts-expect-error' directive. +src/04-advanced-props/25-toggle-props.problem.tsx(42,4): error TS2578: Unused '@ts-expect-error' directive. +src/04-advanced-props/27-either-all-these-props-or-none.problem.tsx(40,8): error TS2578: Unused '@ts-expect-error' directive. +src/04-advanced-props/27-either-all-these-props-or-none.problem.tsx(43,8): error TS2578: Unused '@ts-expect-error' directive. +src/04-advanced-props/28-passing-react-components-vs-passing-react-nodes.problem.tsx(15,30): error TS2345: Argument of type 'ReactNode' is not assignable to parameter of type '(value: number, index: number, array: number[]) => ReactNode'. + Type 'undefined' is not assignable to type '(value: number, index: number, array: number[]) => ReactNode'. +src/04-advanced-props/28-passing-react-components-vs-passing-react-nodes.problem.tsx(22,19): error TS2322: Type '(index: any) => Element' is not assignable to type 'ReactNode'. +src/04-advanced-props/28-passing-react-components-vs-passing-react-nodes.problem.tsx(22,21): error TS7006: Parameter 'index' implicitly has an 'any' type. +src/04-advanced-props/28-passing-react-components-vs-passing-react-nodes.problem.tsx(23,30): error TS2344: Type 'false' does not satisfy the constraint 'true'. +src/04-advanced-props/28-passing-react-components-vs-passing-react-nodes.problem.tsx(28,19): error TS2322: Type '(index: any) => null' is not assignable to type 'ReactNode'. +src/04-advanced-props/28-passing-react-components-vs-passing-react-nodes.problem.tsx(28,21): error TS7006: Parameter 'index' implicitly has an 'any' type. +src/04-advanced-props/28-passing-react-components-vs-passing-react-nodes.problem.tsx(33,9): error TS2578: Unused '@ts-expect-error' directive. +src/04-advanced-props/28-passing-react-components-vs-passing-react-nodes.problem.tsx(37,9): error TS2322: Type '(index: any) => any' is not assignable to type 'ReactNode'. +src/04-advanced-props/28-passing-react-components-vs-passing-react-nodes.problem.tsx(37,21): error TS7006: Parameter 'index' implicitly has an 'any' type. +src/04-advanced-props/31-as-const.problem.ts(13,10): error TS2344: Type 'false' does not satisfy the constraint 'true'. +src/04-advanced-props/31-as-const.problem.ts(14,10): error TS2344: Type 'false' does not satisfy the constraint 'true'. +src/04-advanced-props/32-satisfies-vs-annotation-vs-as.problem.tsx(6,3): error TS2578: Unused '@ts-expect-error' directive. +src/04-advanced-props/32-satisfies-vs-annotation-vs-as.problem.tsx(11,4): error TS2322: Type '{ children: string; type: string; illegalProperty: string; }' is not assignable to type 'DetailedHTMLProps, HTMLButtonElement>'. + Type '{ children: string; type: string; illegalProperty: string; }' is not assignable to type 'ButtonHTMLAttributes'. + Types of property 'type' are incompatible. + Type 'string' is not assignable to type '\\"button\\" | \\"submit\\" | \\"reset\\" | undefined'. +src/04-advanced-props/32-satisfies-vs-annotation-vs-as.problem.tsx(16,20): error TS2344: Type 'false' does not satisfy the constraint 'true'. +src/04-advanced-props/33-prop-groups-with-variants.problem.tsx(7,5): error TS2578: Unused '@ts-expect-error' directive. +src/04-advanced-props/33-prop-groups-with-variants.problem.tsx(13,5): error TS2578: Unused '@ts-expect-error' directive. +src/04-advanced-props/33-prop-groups-with-variants.problem.tsx(19,5): error TS2578: Unused '@ts-expect-error' directive. +src/04-advanced-props/33-prop-groups-with-variants.problem.tsx(48,11): error TS2322: Type '{ children: string; className: string; type: string; illegalProperty: string; } | { children: string; className: string; type: string; illegalProperty: string; } | { children: string; className: string; type: string; illegalProperty: string; }' is not assignable to type 'DetailedHTMLProps, HTMLButtonElement>'. + Type '{ children: string; className: string; type: string; illegalProperty: string; }' is not assignable to type 'DetailedHTMLProps, HTMLButtonElement>'. + Type '{ children: string; className: string; type: string; illegalProperty: string; }' is not assignable to type 'ButtonHTMLAttributes'. + Types of property 'type' are incompatible. + Type 'string' is not assignable to type '\\"button\\" | \\"submit\\" | \\"reset\\" | undefined'. +src/05-generics/36-type-helpers-with-constraints.problem.tsx(14,3): error TS2578: Unused '@ts-expect-error' directive. +src/05-generics/36-type-helpers-with-constraints.problem.tsx(16,3): error TS2578: Unused '@ts-expect-error' directive. +src/05-generics/36-type-helpers-with-constraints.problem.tsx(18,3): error TS2578: Unused '@ts-expect-error' directive. +src/05-generics/37-generic-localstorage-hook.problem.ts(28,30): error TS2558: Expected 0 type arguments, but got 1. +src/05-generics/37-generic-localstorage-hook.problem.ts(35,24): error TS2344: Type 'false' does not satisfy the constraint 'true'. +src/05-generics/37-generic-localstorage-hook.problem.ts(41,5): error TS2578: Unused '@ts-expect-error' directive. +src/05-generics/38-generic-hooks.problem.ts(23,10): error TS2344: Type 'false' does not satisfy the constraint 'true'. +src/05-generics/38-generic-hooks.problem.ts(25,5): error TS2344: Type 'false' does not satisfy the constraint 'true'. +src/05-generics/38-generic-hooks.problem.ts(35,10): error TS2344: Type 'false' does not satisfy the constraint 'true'. +src/05-generics/38-generic-hooks.problem.ts(36,10): error TS2344: Type 'false' does not satisfy the constraint 'true'. +src/05-generics/39-generic-props.problem.tsx(41,30): error TS2344: Type 'false' does not satisfy the constraint 'true'. +src/05-generics/39-generic-props.problem.tsx(45,17): error TS2578: Unused '@ts-expect-error' directive. +src/05-generics/40-generic-class-components.problem.tsx(37,30): error TS2344: Type 'false' does not satisfy the constraint 'true'. +src/05-generics/40-generic-class-components.problem.tsx(41,17): error TS2578: Unused '@ts-expect-error' directive. +src/05-generics/41-passing-types-to-components.problem.tsx(29,5): error TS2578: Unused '@ts-expect-error' directive. +src/05-generics/41-passing-types-to-components.problem.tsx(32,26): error TS2344: Type 'false' does not satisfy the constraint 'true'. +src/05-generics/41-passing-types-to-components.problem.tsx(33,23): error TS2339: Property 'name' does not exist on type 'number'. +src/05-generics/41-passing-types-to-components.problem.tsx(44,9): error TS2578: Unused '@ts-expect-error' directive. +src/05-generics/41-passing-types-to-components.problem.tsx(51,26): error TS2344: Type 'false' does not satisfy the constraint 'true'. +src/05-generics/42-generic-inference-through-multiple-helpers.problem.tsx(44,26): error TS2344: Type 'false' does not satisfy the constraint 'true'. +src/05-generics/42-passing-types-to-components.problem.tsx(35,26): error TS2344: Type 'false' does not satisfy the constraint 'true'. +src/05-generics/42-passing-types-to-components.problem.tsx(36,23): error TS2339: Property 'name' does not exist on type 'number'. +src/05-generics/42-passing-types-to-components.problem.tsx(47,9): error TS2578: Unused '@ts-expect-error' directive. +src/05-generics/42-passing-types-to-components.problem.tsx(54,26): error TS2344: Type 'false' does not satisfy the constraint 'true'. +src/05-generics/43-inference-flow-with-constraints.problem.ts(42,1): error TS2578: Unused '@ts-expect-error' directive. +src/05-generics/43-inference-flow-with-constraints.problem.ts(52,5): error TS2578: Unused '@ts-expect-error' directive. +src/05-generics/43-inference-flow-with-constraints.problem.ts(60,5): error TS2344: Type 'false' does not satisfy the constraint 'true'. +src/06-advanced-hooks/45-tuple-return-type.problem.ts(23,10): error TS2344: Type 'false' does not satisfy the constraint 'true'. +src/06-advanced-hooks/45-tuple-return-type.problem.ts(24,10): error TS2344: Type 'false' does not satisfy the constraint 'true'. +src/06-advanced-hooks/46-required-context.problem.tsx(33,55): error TS2558: Expected 0 type arguments, but got 1. +src/06-advanced-hooks/46-required-context.problem.tsx(37,57): error TS2558: Expected 0 type arguments, but got 1. +src/06-advanced-hooks/46-required-context.problem.tsx(42,16): error TS2554: Expected 1 arguments, but got 0. +src/06-advanced-hooks/46-required-context.problem.tsx(45,5): error TS2344: Type 'false' does not satisfy the constraint 'true'. +src/06-advanced-hooks/46-required-context.problem.tsx(53,17): error TS2554: Expected 1 arguments, but got 0. +src/06-advanced-hooks/46-required-context.problem.tsx(56,5): error TS2344: Type 'false' does not satisfy the constraint 'true'. +src/06-advanced-hooks/46-required-context.problem.tsx(70,21): error TS2322: Type '{ name: string; }' is not assignable to type 'null'. +src/06-advanced-hooks/46-required-context.problem.tsx(72,11): error TS2322: Type '{ primaryColor: string; }' is not assignable to type 'null'. +src/06-advanced-hooks/47-unions-in-usestate.problem.tsx(45,3): error TS2578: Unused '@ts-expect-error' directive. +src/06-advanced-hooks/47-unions-in-usestate.problem.tsx(62,22): error TS2344: Type 'false' does not satisfy the constraint 'true'. +src/06-advanced-hooks/48-discriminated-unions-in-usestate.problem.tsx(28,37): error TS2345: Argument of type '{ status: string; error: any; }' is not assignable to parameter of type 'SetStateAction<{ status: string; }>'. + Object literal may only specify known properties, and 'error' does not exist in type 'SetStateAction<{ status: string; }>'. +src/06-advanced-hooks/48-discriminated-unions-in-usestate.problem.tsx(36,3): error TS2578: Unused '@ts-expect-error' directive. +src/06-advanced-hooks/48-discriminated-unions-in-usestate.problem.tsx(46,25): error TS2339: Property 'error' does not exist on type '{ status: string; }'. +src/06-advanced-hooks/49-discriminated-tuples-from-custom-hooks.problem.tsx(46,25): error TS18048: 'value' is possibly 'undefined'. +src/06-advanced-hooks/49-discriminated-tuples-from-custom-hooks.problem.tsx(46,31): error TS2339: Property 'message' does not exist on type 'Error | { title: string; }'. + Property 'message' does not exist on type '{ title: string; }'. +src/06-advanced-hooks/49-discriminated-tuples-from-custom-hooks.problem.tsx(49,16): error TS18048: 'value' is possibly 'undefined'. +src/06-advanced-hooks/49-discriminated-tuples-from-custom-hooks.problem.tsx(49,22): error TS2339: Property 'title' does not exist on type 'Error | { title: string; }'. + Property 'title' does not exist on type 'Error'. +src/06-advanced-hooks/50-use-state-overloads.problem.ts(36,10): error TS2344: Type 'false' does not satisfy the constraint 'true'. +src/06-advanced-hooks/51-function-overloads-in-hooks.problem.ts(37,22): error TS2554: Expected 1 arguments, but got 0. +src/06-advanced-hooks/51-function-overloads-in-hooks.problem.ts(40,10): error TS2344: Type 'false' does not satisfy the constraint 'true'. +src/06-advanced-hooks/51-function-overloads-in-hooks.problem.ts(42,5): error TS2344: Type 'false' does not satisfy the constraint 'true'. +src/06-advanced-hooks/52-currying-hooks.problem.ts(38,22): error TS2344: Type 'false' does not satisfy the constraint 'true'. +src/07-types-deep-dive/54-understanding-jsx-element.explainer.tsx(52,3): error TS2322: Type 'string' is not assignable to type 'ReactElement>'. +src/07-types-deep-dive/55-strongly-typing-children.explainer.tsx(32,3): error TS2322: Type 'Element' is not assignable to type 'OptionType'. + Type 'ReactElement' is not assignable to type '{ __brand: \\"OPTION_TYPE\\"; } & ReactPortal'. + Property '__brand' is missing in type 'ReactElement' but required in type '{ __brand: \\"OPTION_TYPE\\"; }'. +src/07-types-deep-dive/56-understanding-jsx-intrinsic-elements.explainer.tsx(30,1): error TS2339: Property 'myNewElement' does not exist on type 'JSX.IntrinsicElements'. +src/07-types-deep-dive/58-appending-to-global-namespace.problem.ts(15,20): error TS2344: Type 'false' does not satisfy the constraint 'true'. +src/07-types-deep-dive/58-appending-to-global-namespace.problem.ts(15,32): error TS2694: Namespace 'React' has no exported member 'MyInterface'. +src/07-types-deep-dive/59-declaration-merging-in-global-namespace.problem.ts(25,3): error TS2344: Type 'false' does not satisfy the constraint 'true'. +src/07-types-deep-dive/60-add-new-global-element.problem.tsx(14,3): error TS2339: Property 'something' does not exist on type 'JSX.IntrinsicElements'. +src/07-types-deep-dive/60-add-new-global-element.problem.tsx(14,23): error TS2339: Property 'something' does not exist on type 'JSX.IntrinsicElements'. +src/07-types-deep-dive/62-add-attribute-to-all-elements.problem.tsx(10,8): error TS2322: Type '{ testId: string; }' is not assignable to type 'DetailedHTMLProps, HTMLDivElement>'. + Property 'testId' does not exist on type 'DetailedHTMLProps, HTMLDivElement>'. +src/07-types-deep-dive/62-add-attribute-to-all-elements.problem.tsx(11,10): error TS2322: Type '{ testId: string; }' is not assignable to type 'DetailedHTMLProps, HTMLAudioElement>'. + Property 'testId' does not exist on type 'DetailedHTMLProps, HTMLAudioElement>'. +src/07-types-deep-dive/62-add-attribute-to-all-elements.problem.tsx(12,10): error TS2322: Type '{ testId: string; }' is not assignable to type 'DetailedHTMLProps, HTMLVideoElement>'. + Property 'testId' does not exist on type 'DetailedHTMLProps, HTMLVideoElement>'. +src/07-types-deep-dive/62-add-attribute-to-all-elements.problem.tsx(13,6): error TS2322: Type '{ testId: string; }' is not assignable to type 'DetailedHTMLProps, HTMLAnchorElement>'. + Property 'testId' does not exist on type 'DetailedHTMLProps, HTMLAnchorElement>'. +src/07-types-deep-dive/62-add-attribute-to-all-elements.problem.tsx(14,9): error TS2322: Type '{ testId: string; }' is not assignable to type 'DetailedHTMLProps, HTMLElement>'. + Property 'testId' does not exist on type 'DetailedHTMLProps, HTMLElement>'. +src/07-types-deep-dive/62-add-attribute-to-all-elements.problem.tsx(15,12): error TS2322: Type '{ testId: string; }' is not assignable to type 'DetailedHTMLProps, HTMLElement>'. + Property 'testId' does not exist on type 'DetailedHTMLProps, HTMLElement>'. +src/08-advanced-patterns/63-lazy-load-component.problem.tsx(18,44): error TS2345: Argument of type 'unknown' is not assignable to parameter of type '() => Promise<{ default: ComponentType; }>'. +src/08-advanced-patterns/63-lazy-load-component.problem.tsx(28,62): error TS2322: Type '{ loader: () => Promise; id: string; }' is not assignable to type 'IntrinsicAttributes & Props'. + Property 'id' does not exist on type 'IntrinsicAttributes & Props'. +src/08-advanced-patterns/63-lazy-load-component.problem.tsx(36,4): error TS2578: Unused '@ts-expect-error' directive. +src/08-advanced-patterns/65-render-props.problem.tsx(43,9): error TS7006: Parameter 'props' implicitly has an 'any' type. +src/08-advanced-patterns/65-render-props.problem.tsx(44,28): error TS2344: Type 'false' does not satisfy the constraint 'true'. +src/08-advanced-patterns/66-forward-ref-with-generics.explainer.1.tsx(45,28): error TS2344: Type 'false' does not satisfy the constraint 'true'. +src/08-advanced-patterns/66-forward-ref-with-generics.explainer.2.tsx(26,28): error TS2344: Type 'false' does not satisfy the constraint 'true'. +src/08-advanced-patterns/66-forward-ref-with-generics.explainer.3.ts(52,21): error TS2344: Type 'false' does not satisfy the constraint 'true'. +src/08-advanced-patterns/67-forward-ref-as-local-function.problem.tsx(30,19): error TS7006: Parameter 'row' implicitly has an 'any' type. +src/08-advanced-patterns/67-forward-ref-as-local-function.problem.tsx(31,28): error TS2344: Type 'false' does not satisfy the constraint 'true'. +src/08-advanced-patterns/68-hoc.problem.tsx(43,5): error TS2578: Unused '@ts-expect-error' directive. +src/08-advanced-patterns/69-record-of-components-with-same-props.problem.tsx(16,10): error TS7006: Parameter 'props' implicitly has an 'any' type. +src/08-advanced-patterns/69-record-of-components-with-same-props.problem.tsx(19,12): error TS7006: Parameter 'props' implicitly has an 'any' type. +src/08-advanced-patterns/69-record-of-components-with-same-props.problem.tsx(22,14): error TS7006: Parameter 'props' implicitly has an 'any' type. +src/08-advanced-patterns/69-record-of-components-with-same-props.problem.tsx(28,21): error TS7053: Element implicitly has an 'any' type because expression of type 'any' can't be used to index type '{ text: (props: any) => Element; number: (props: any) => Element; password: (props: any) => Element; }'. +src/08-advanced-patterns/69-record-of-components-with-same-props.problem.tsx(28,32): error TS18046: 'props' is of type 'unknown'. +src/08-advanced-patterns/69-record-of-components-with-same-props.problem.tsx(29,25): error TS2698: Spread types may only be created from object types. +src/08-advanced-patterns/69-record-of-components-with-same-props.problem.tsx(34,5): error TS2322: Type '{ type: string; onChange: (e: any) => void; }' is not assignable to type 'IntrinsicAttributes'. + Property 'type' does not exist on type 'IntrinsicAttributes'. +src/08-advanced-patterns/69-record-of-components-with-same-props.problem.tsx(35,16): error TS7006: Parameter 'e' implicitly has an 'any' type. +src/08-advanced-patterns/69-record-of-components-with-same-props.problem.tsx(37,26): error TS2344: Type 'false' does not satisfy the constraint 'true'. +src/08-advanced-patterns/69-record-of-components-with-same-props.problem.tsx(40,10): error TS2322: Type '{ type: string; }' is not assignable to type 'IntrinsicAttributes'. + Property 'type' does not exist on type 'IntrinsicAttributes'. +src/08-advanced-patterns/69-record-of-components-with-same-props.problem.tsx(41,10): error TS2322: Type '{ type: string; }' is not assignable to type 'IntrinsicAttributes'. + Property 'type' does not exist on type 'IntrinsicAttributes'. +src/08-advanced-patterns/70-as-prop.problem.tsx(37,5): error TS2578: Unused '@ts-expect-error' directive. +src/08-advanced-patterns/71-as-prop-with-custom-components.problem.tsx(14,11): error TS2604: JSX element type 'Comp' does not have any construct or call signatures. +src/08-advanced-patterns/71-as-prop-with-custom-components.problem.tsx(14,11): error TS2786: 'Comp' cannot be used as a JSX component. + Its type 'unknown' is not a valid JSX element type. +src/08-advanced-patterns/71-as-prop-with-custom-components.problem.tsx(21,20): error TS2322: Type '{ as: (props: { href: string; children?: ReactNode; }) => Element; href: string; }' is not assignable to type 'IntrinsicAttributes & { as: unknown; }'. + Property 'href' does not exist on type 'IntrinsicAttributes & { as: unknown; }'. +src/08-advanced-patterns/72-as-prop-with-default.problem.tsx(10,11): error TS2322: Type 'Omit<{ as: T; } & ComponentPropsWithoutRef, \\"as\\">' is not assignable to type 'IntrinsicAttributes & LibraryManagedAttributes'. + Type 'Omit<{ as: T; } & ComponentPropsWithoutRef, \\"as\\">' is not assignable to type 'LibraryManagedAttributes'. +src/08-advanced-patterns/72-as-prop-with-default.problem.tsx(14,2): error TS2741: Property 'as' is missing in type '{ href: string; }' but required in type '{ as: ElementType; }'. +src/09-external-libraries/74-react-hook-form-wrapper.problem.tsx(29,3): error TS2578: Unused '@ts-expect-error' directive. +src/09-external-libraries/74-react-hook-form-wrapper.problem.tsx(42,5): error TS2344: Type 'boolean' does not satisfy the constraint 'true'. +src/09-external-libraries/75-react-select.problem.tsx(10,24): error TS7006: Parameter 'props' implicitly has an 'any' type. +src/09-external-libraries/75-react-select.problem.tsx(33,16): error TS7006: Parameter 'option' implicitly has an 'any' type. +src/09-external-libraries/75-react-select.problem.tsx(36,26): error TS2344: Type 'false' does not satisfy the constraint 'true'. +src/09-external-libraries/75-react-select.problem.tsx(43,16): error TS7006: Parameter 'option' implicitly has an 'any' type. +src/09-external-libraries/75-react-select.problem.tsx(45,26): error TS2344: Type 'false' does not satisfy the constraint 'true'. +src/09-external-libraries/77-react-query-wrapper.problem.ts(30,12): error TS2344: Type 'false' does not satisfy the constraint 'true'. +src/09-external-libraries/77-react-query-wrapper.problem.ts(44,10): error TS2344: Type 'false' does not satisfy the constraint 'true'. +src/09-external-libraries/77-react-query-wrapper.problem.ts(50,22): error TS2344: Type 'false' does not satisfy the constraint 'true'. +," +`; + +exports[`vitest > Should have the correct Vitest errors 1`] = ` +{ + "success": false, + "testResults": [ + { + "assertionResults": [], + "message": "No test found in suite src/01-introduction/01-react-in-typescript.explainer.tsx", + "name": "/src/01-introduction/01-react-in-typescript.explainer.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/01-introduction/02-typescript-in-react-frameworks.explainer.ts", + "name": "/src/01-introduction/02-typescript-in-react-frameworks.explainer.ts", + "status": "passed", + }, + { + "assertionResults": [], + "message": "Transform failed with 1 error: +/src/01-introduction/03-navigating-jsx-types.problem.tsx:5:21: ERROR: Unexpected \\"}\\"", + "name": "/src/01-introduction/03-navigating-jsx-types.problem.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/01-introduction/03-navigating-jsx-types.solution.tsx", + "name": "/src/01-introduction/03-navigating-jsx-types.solution.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/02-components/04-typing-components.problem.tsx", + "name": "/src/02-components/04-typing-components.problem.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/02-components/04-typing-components.solution.1.tsx", + "name": "/src/02-components/04-typing-components.solution.1.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/02-components/04-typing-components.solution.2.tsx", + "name": "/src/02-components/04-typing-components.solution.2.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/02-components/04-typing-components.solution.3.tsx", + "name": "/src/02-components/04-typing-components.solution.3.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/02-components/04-typing-components.solution.4.tsx", + "name": "/src/02-components/04-typing-components.solution.4.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/02-components/05-typing-components-as-functions.problem.tsx", + "name": "/src/02-components/05-typing-components-as-functions.problem.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/02-components/05-typing-components-as-functions.solution.tsx", + "name": "/src/02-components/05-typing-components-as-functions.solution.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/02-components/06-typing-children.problem.tsx", + "name": "/src/02-components/06-typing-children.problem.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/02-components/06-typing-children.solution.tsx", + "name": "/src/02-components/06-typing-children.solution.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/02-components/07-typing-onclick-handlers.problem.tsx", + "name": "/src/02-components/07-typing-onclick-handlers.problem.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/02-components/07-typing-onclick-handlers.solution.tsx", + "name": "/src/02-components/07-typing-onclick-handlers.solution.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/02-components/08-using-html-props.problem.tsx", + "name": "/src/02-components/08-using-html-props.problem.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/02-components/08-using-html-props.solution.1.tsx", + "name": "/src/02-components/08-using-html-props.solution.1.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/02-components/08-using-html-props.solution.2.tsx", + "name": "/src/02-components/08-using-html-props.solution.2.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/02-components/09-html-props-with-one-changed.problem.tsx", + "name": "/src/02-components/09-html-props-with-one-changed.problem.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/02-components/09-html-props-with-one-changed.solution.1.tsx", + "name": "/src/02-components/09-html-props-with-one-changed.solution.1.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/02-components/09-html-props-with-one-changed.solution.2.tsx", + "name": "/src/02-components/09-html-props-with-one-changed.solution.2.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/02-components/09-html-props-with-one-changed.solution.3.tsx", + "name": "/src/02-components/09-html-props-with-one-changed.solution.3.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/02-components/09-html-props-with-one-changed.solution.4.tsx", + "name": "/src/02-components/09-html-props-with-one-changed.solution.4.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/02-components/10-extracting-props-from-custom-components.problem.tsx", + "name": "/src/02-components/10-extracting-props-from-custom-components.problem.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/02-components/10-extracting-props-from-custom-components.solution.tsx", + "name": "/src/02-components/10-extracting-props-from-custom-components.solution.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/03-hooks/11-use-state.problem.tsx", + "name": "/src/03-hooks/11-use-state.problem.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/03-hooks/11-use-state.solution.tsx", + "name": "/src/03-hooks/11-use-state.solution.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/03-hooks/12-use-state-with-undefined.problem.ts", + "name": "/src/03-hooks/12-use-state-with-undefined.problem.ts", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/03-hooks/12-use-state-with-undefined.solution.1.ts", + "name": "/src/03-hooks/12-use-state-with-undefined.solution.1.ts", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/03-hooks/12-use-state-with-undefined.solution.2.ts", + "name": "/src/03-hooks/12-use-state-with-undefined.solution.2.ts", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/03-hooks/13-use-state-excess-properties.problem.tsx", + "name": "/src/03-hooks/13-use-state-excess-properties.problem.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/03-hooks/13-use-state-excess-properties.solution.tsx", + "name": "/src/03-hooks/13-use-state-excess-properties.solution.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/03-hooks/14-use-effect.problem.ts", + "name": "/src/03-hooks/14-use-effect.problem.ts", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/03-hooks/14-use-effect.solution.ts", + "name": "/src/03-hooks/14-use-effect.solution.ts", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/03-hooks/15-use-callback.problem.tsx", + "name": "/src/03-hooks/15-use-callback.problem.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/03-hooks/15-use-callback.solution.tsx", + "name": "/src/03-hooks/15-use-callback.solution.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/03-hooks/16-use-memo.problem.tsx", + "name": "/src/03-hooks/16-use-memo.problem.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/03-hooks/16-use-memo.solution.1.tsx", + "name": "/src/03-hooks/16-use-memo.solution.1.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/03-hooks/16-use-memo.solution.2.tsx", + "name": "/src/03-hooks/16-use-memo.solution.2.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/03-hooks/16-use-memo.solution.3.tsx", + "name": "/src/03-hooks/16-use-memo.solution.3.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/03-hooks/17-use-ref-basics.problem.tsx", + "name": "/src/03-hooks/17-use-ref-basics.problem.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/03-hooks/17-use-ref-basics.solution.tsx", + "name": "/src/03-hooks/17-use-ref-basics.solution.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/03-hooks/18-element-refs.explainer.tsx", + "name": "/src/03-hooks/18-element-refs.explainer.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/03-hooks/19-use-ref-with-elements.problem.tsx", + "name": "/src/03-hooks/19-use-ref-with-elements.problem.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/03-hooks/19-use-ref-with-elements.solution.tsx", + "name": "/src/03-hooks/19-use-ref-with-elements.solution.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/03-hooks/20-why-is-my-ref-readonly.problem.tsx", + "name": "/src/03-hooks/20-why-is-my-ref-readonly.problem.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/03-hooks/20-why-is-my-ref-readonly.solution.tsx", + "name": "/src/03-hooks/20-why-is-my-ref-readonly.solution.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "Cannot read properties of null (reading 'useReducer')", + "name": "/src/03-hooks/21-use-reducer.problem.ts", + "status": "passed", + }, + { + "assertionResults": [], + "message": "Cannot read properties of null (reading 'useReducer')", + "name": "/src/03-hooks/21-use-reducer.solution.1.ts", + "status": "passed", + }, + { + "assertionResults": [], + "message": "Cannot read properties of null (reading 'useReducer')", + "name": "/src/03-hooks/21-use-reducer.solution.2.ts", + "status": "passed", + }, + { + "assertionResults": [], + "message": "Cannot read properties of null (reading 'useReducer')", + "name": "/src/03-hooks/21-use-reducer.solution.3.ts", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/04-advanced-props/22-discriminated-union-props.problem.tsx", + "name": "/src/04-advanced-props/22-discriminated-union-props.problem.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/04-advanced-props/22-discriminated-union-props.solution.tsx", + "name": "/src/04-advanced-props/22-discriminated-union-props.solution.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/04-advanced-props/23-destructuring-discriminated-unions.problem.tsx", + "name": "/src/04-advanced-props/23-destructuring-discriminated-unions.problem.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/04-advanced-props/23-destructuring-discriminated-unions.solution.1.tsx", + "name": "/src/04-advanced-props/23-destructuring-discriminated-unions.solution.1.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/04-advanced-props/23-destructuring-discriminated-unions.solution.2.tsx", + "name": "/src/04-advanced-props/23-destructuring-discriminated-unions.solution.2.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/04-advanced-props/24-discriminated-union-with-other-props.problem.tsx", + "name": "/src/04-advanced-props/24-discriminated-union-with-other-props.problem.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/04-advanced-props/24-discriminated-union-with-other-props.solution.tsx", + "name": "/src/04-advanced-props/24-discriminated-union-with-other-props.solution.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/04-advanced-props/25-toggle-props.problem.tsx", + "name": "/src/04-advanced-props/25-toggle-props.problem.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/04-advanced-props/25-toggle-props.solution.tsx", + "name": "/src/04-advanced-props/25-toggle-props.solution.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/04-advanced-props/26-empty-object-type.explainer.tsx", + "name": "/src/04-advanced-props/26-empty-object-type.explainer.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/04-advanced-props/27-either-all-these-props-or-none.problem.tsx", + "name": "/src/04-advanced-props/27-either-all-these-props-or-none.problem.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/04-advanced-props/27-either-all-these-props-or-none.solution.tsx", + "name": "/src/04-advanced-props/27-either-all-these-props-or-none.solution.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/04-advanced-props/28-passing-react-components-vs-passing-react-nodes.problem.tsx", + "name": "/src/04-advanced-props/28-passing-react-components-vs-passing-react-nodes.problem.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/04-advanced-props/28-passing-react-components-vs-passing-react-nodes.solution.1.tsx", + "name": "/src/04-advanced-props/28-passing-react-components-vs-passing-react-nodes.solution.1.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/04-advanced-props/28-passing-react-components-vs-passing-react-nodes.solution.2.tsx", + "name": "/src/04-advanced-props/28-passing-react-components-vs-passing-react-nodes.solution.2.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/04-advanced-props/29-variants-with-classnames.problem.tsx", + "name": "/src/04-advanced-props/29-variants-with-classnames.problem.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/04-advanced-props/29-variants-with-classnames.solution.tsx", + "name": "/src/04-advanced-props/29-variants-with-classnames.solution.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/04-advanced-props/30-partial-autocomplete.problem.tsx", + "name": "/src/04-advanced-props/30-partial-autocomplete.problem.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/04-advanced-props/30-partial-autocomplete.solution.tsx", + "name": "/src/04-advanced-props/30-partial-autocomplete.solution.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/04-advanced-props/31-as-const.problem.ts", + "name": "/src/04-advanced-props/31-as-const.problem.ts", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/04-advanced-props/31-as-const.solution.ts", + "name": "/src/04-advanced-props/31-as-const.solution.ts", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/04-advanced-props/32-satisfies-vs-annotation-vs-as.problem.tsx", + "name": "/src/04-advanced-props/32-satisfies-vs-annotation-vs-as.problem.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/04-advanced-props/32-satisfies-vs-annotation-vs-as.solution.tsx", + "name": "/src/04-advanced-props/32-satisfies-vs-annotation-vs-as.solution.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/04-advanced-props/33-prop-groups-with-variants.problem.tsx", + "name": "/src/04-advanced-props/33-prop-groups-with-variants.problem.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/04-advanced-props/33-prop-groups-with-variants.solution.tsx", + "name": "/src/04-advanced-props/33-prop-groups-with-variants.solution.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/05-generics/34-type-helpers.problem.tsx", + "name": "/src/05-generics/34-type-helpers.problem.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/05-generics/34-type-helpers.solution.tsx", + "name": "/src/05-generics/34-type-helpers.solution.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/05-generics/35-type-helpers-2.problem.tsx", + "name": "/src/05-generics/35-type-helpers-2.problem.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/05-generics/35-type-helpers-2.solution.tsx", + "name": "/src/05-generics/35-type-helpers-2.solution.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/05-generics/36-type-helpers-with-constraints.problem.tsx", + "name": "/src/05-generics/36-type-helpers-with-constraints.problem.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/05-generics/36-type-helpers-with-constraints.solution.1.tsx", + "name": "/src/05-generics/36-type-helpers-with-constraints.solution.1.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/05-generics/36-type-helpers-with-constraints.solution.2.tsx", + "name": "/src/05-generics/36-type-helpers-with-constraints.solution.2.tsx", + "status": "passed", + }, + { + "assertionResults": [ + { + "ancestorTitles": [ + "", + ], + "failureMessages": [], + "fullName": " Should let you set and get values", + "status": "passed", + "title": "Should let you set and get values", + }, + { + "ancestorTitles": [ + "", + ], + "failureMessages": [], + "fullName": " Should not let you set a value that is not the same type as the type argument passed", + "status": "passed", + "title": "Should not let you set a value that is not the same type as the type argument passed", + }, + ], + "message": "", + "name": "/src/05-generics/37-generic-localstorage-hook.problem.ts", + "status": "passed", + }, + { + "assertionResults": [ + { + "ancestorTitles": [ + "", + ], + "failureMessages": [], + "fullName": " Should let you set and get values", + "status": "passed", + "title": "Should let you set and get values", + }, + { + "ancestorTitles": [ + "", + ], + "failureMessages": [], + "fullName": " Should not let you set a value that is not the same type as the type argument passed", + "status": "passed", + "title": "Should not let you set a value that is not the same type as the type argument passed", + }, + ], + "message": "", + "name": "/src/05-generics/37-generic-localstorage-hook.solution.ts", + "status": "passed", + }, + { + "assertionResults": [], + "message": "Cannot read properties of null (reading 'useState')", + "name": "/src/05-generics/38-generic-hooks.problem.ts", + "status": "passed", + }, + { + "assertionResults": [], + "message": "Cannot read properties of null (reading 'useState')", + "name": "/src/05-generics/38-generic-hooks.solution.1.ts", + "status": "passed", + }, + { + "assertionResults": [], + "message": "Cannot read properties of null (reading 'useState')", + "name": "/src/05-generics/38-generic-hooks.solution.2.ts", + "status": "passed", + }, + { + "assertionResults": [], + "message": "Cannot read properties of null (reading 'useState')", + "name": "/src/05-generics/38-generic-hooks.solution.3.ts", + "status": "passed", + }, + { + "assertionResults": [], + "message": "Cannot read properties of null (reading 'useState')", + "name": "/src/05-generics/38-generic-hooks.solution.4.ts", + "status": "passed", + }, + { + "assertionResults": [], + "message": "Cannot read properties of null (reading 'useState')", + "name": "/src/05-generics/38-generic-hooks.solution.5.ts", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/05-generics/39-generic-props.problem.tsx", + "name": "/src/05-generics/39-generic-props.problem.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/05-generics/39-generic-props.solution.tsx", + "name": "/src/05-generics/39-generic-props.solution.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "React is not defined", + "name": "/src/05-generics/40-generic-class-components.problem.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "React is not defined", + "name": "/src/05-generics/40-generic-class-components.solution.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/05-generics/41-passing-types-to-components.problem.tsx", + "name": "/src/05-generics/41-passing-types-to-components.problem.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/05-generics/41-passing-types-to-components.solution.tsx", + "name": "/src/05-generics/41-passing-types-to-components.solution.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/05-generics/42-generic-inference-through-multiple-helpers.problem.tsx", + "name": "/src/05-generics/42-generic-inference-through-multiple-helpers.problem.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/05-generics/42-generic-inference-through-multiple-helpers.solution.tsx", + "name": "/src/05-generics/42-generic-inference-through-multiple-helpers.solution.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/05-generics/42-passing-types-to-components.problem.tsx", + "name": "/src/05-generics/42-passing-types-to-components.problem.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "Cannot read properties of null (reading 'useState')", + "name": "/src/05-generics/43-inference-flow-with-constraints.problem.ts", + "status": "passed", + }, + { + "assertionResults": [], + "message": "Cannot read properties of null (reading 'useState')", + "name": "/src/05-generics/43-inference-flow-with-constraints.solution.ts", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/05-generics/44-generics-vs-discriminated-unions.problem.tsx", + "name": "/src/05-generics/44-generics-vs-discriminated-unions.problem.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/05-generics/44-generics-vs-discriminated-unions.solution.tsx", + "name": "/src/05-generics/44-generics-vs-discriminated-unions.solution.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "Cannot read properties of null (reading 'useState')", + "name": "/src/06-advanced-hooks/45-tuple-return-type.problem.ts", + "status": "passed", + }, + { + "assertionResults": [], + "message": "Cannot read properties of null (reading 'useState')", + "name": "/src/06-advanced-hooks/45-tuple-return-type.solution.1.ts", + "status": "passed", + }, + { + "assertionResults": [], + "message": "Cannot read properties of null (reading 'useState')", + "name": "/src/06-advanced-hooks/45-tuple-return-type.solution.2.ts", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/06-advanced-hooks/46-required-context.problem.tsx", + "name": "/src/06-advanced-hooks/46-required-context.problem.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/06-advanced-hooks/46-required-context.solution.1.tsx", + "name": "/src/06-advanced-hooks/46-required-context.solution.1.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/06-advanced-hooks/46-required-context.solution.2.tsx", + "name": "/src/06-advanced-hooks/46-required-context.solution.2.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/06-advanced-hooks/47-unions-in-usestate.problem.tsx", + "name": "/src/06-advanced-hooks/47-unions-in-usestate.problem.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/06-advanced-hooks/47-unions-in-usestate.solution.tsx", + "name": "/src/06-advanced-hooks/47-unions-in-usestate.solution.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/06-advanced-hooks/48-discriminated-unions-in-usestate.problem.tsx", + "name": "/src/06-advanced-hooks/48-discriminated-unions-in-usestate.problem.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/06-advanced-hooks/48-discriminated-unions-in-usestate.solution.tsx", + "name": "/src/06-advanced-hooks/48-discriminated-unions-in-usestate.solution.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/06-advanced-hooks/49-discriminated-tuples-from-custom-hooks.problem.tsx", + "name": "/src/06-advanced-hooks/49-discriminated-tuples-from-custom-hooks.problem.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/06-advanced-hooks/49-discriminated-tuples-from-custom-hooks.solution.tsx", + "name": "/src/06-advanced-hooks/49-discriminated-tuples-from-custom-hooks.solution.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/06-advanced-hooks/50-use-state-overloads.problem.ts", + "name": "/src/06-advanced-hooks/50-use-state-overloads.problem.ts", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/06-advanced-hooks/50-use-state-overloads.solution.1.ts", + "name": "/src/06-advanced-hooks/50-use-state-overloads.solution.1.ts", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/06-advanced-hooks/50-use-state-overloads.solution.2.ts", + "name": "/src/06-advanced-hooks/50-use-state-overloads.solution.2.ts", + "status": "passed", + }, + { + "assertionResults": [], + "message": "Cannot read properties of null (reading 'useState')", + "name": "/src/06-advanced-hooks/51-function-overloads-in-hooks.problem.ts", + "status": "passed", + }, + { + "assertionResults": [], + "message": "Cannot read properties of null (reading 'useState')", + "name": "/src/06-advanced-hooks/51-function-overloads-in-hooks.solution.1.ts", + "status": "passed", + }, + { + "assertionResults": [], + "message": "Cannot read properties of null (reading 'useState')", + "name": "/src/06-advanced-hooks/51-function-overloads-in-hooks.solution.2.ts", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/06-advanced-hooks/52-currying-hooks.problem.ts", + "name": "/src/06-advanced-hooks/52-currying-hooks.problem.ts", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/06-advanced-hooks/52-currying-hooks.solution.ts", + "name": "/src/06-advanced-hooks/52-currying-hooks.solution.ts", + "status": "passed", + }, + { + "assertionResults": [], + "message": "React is not defined", + "name": "/src/07-types-deep-dive/53-understand-react-namespace-export.problem.ts", + "status": "passed", + }, + { + "assertionResults": [], + "message": "React is not defined", + "name": "/src/07-types-deep-dive/53-understand-react-namespace-export.solution.ts", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/07-types-deep-dive/54-understanding-jsx-element.explainer.tsx", + "name": "/src/07-types-deep-dive/54-understanding-jsx-element.explainer.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/07-types-deep-dive/55-strongly-typing-children.explainer.tsx", + "name": "/src/07-types-deep-dive/55-strongly-typing-children.explainer.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/07-types-deep-dive/56-understanding-jsx-intrinsic-elements.explainer.tsx", + "name": "/src/07-types-deep-dive/56-understanding-jsx-intrinsic-elements.explainer.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "React is not defined", + "name": "/src/07-types-deep-dive/57-react-component-type.explainer.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/07-types-deep-dive/58-appending-to-global-namespace.problem.ts", + "name": "/src/07-types-deep-dive/58-appending-to-global-namespace.problem.ts", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/07-types-deep-dive/58-appending-to-global-namespace.solution.ts", + "name": "/src/07-types-deep-dive/58-appending-to-global-namespace.solution.ts", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/07-types-deep-dive/59-declaration-merging-in-global-namespace.problem.ts", + "name": "/src/07-types-deep-dive/59-declaration-merging-in-global-namespace.problem.ts", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/07-types-deep-dive/59-declaration-merging-in-global-namespace.solution.ts", + "name": "/src/07-types-deep-dive/59-declaration-merging-in-global-namespace.solution.ts", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/07-types-deep-dive/60-add-new-global-element.problem.tsx", + "name": "/src/07-types-deep-dive/60-add-new-global-element.problem.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/07-types-deep-dive/60-add-new-global-element.solution.tsx", + "name": "/src/07-types-deep-dive/60-add-new-global-element.solution.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/07-types-deep-dive/61-html-attributes.explainer.tsx", + "name": "/src/07-types-deep-dive/61-html-attributes.explainer.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/07-types-deep-dive/62-add-attribute-to-all-elements.problem.tsx", + "name": "/src/07-types-deep-dive/62-add-attribute-to-all-elements.problem.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/07-types-deep-dive/62-add-attribute-to-all-elements.solution.tsx", + "name": "/src/07-types-deep-dive/62-add-attribute-to-all-elements.solution.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/08-advanced-patterns/63-lazy-load-component.problem.tsx", + "name": "/src/08-advanced-patterns/63-lazy-load-component.problem.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/08-advanced-patterns/63-lazy-load-component.solution.tsx", + "name": "/src/08-advanced-patterns/63-lazy-load-component.solution.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/08-advanced-patterns/64-const-generics-in-generic-components.problem.tsx", + "name": "/src/08-advanced-patterns/64-const-generics-in-generic-components.problem.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/08-advanced-patterns/65-render-props.problem.tsx", + "name": "/src/08-advanced-patterns/65-render-props.problem.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/08-advanced-patterns/65-render-props.solution.tsx", + "name": "/src/08-advanced-patterns/65-render-props.solution.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/08-advanced-patterns/66-forward-ref-with-generics.explainer.1.tsx", + "name": "/src/08-advanced-patterns/66-forward-ref-with-generics.explainer.1.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/08-advanced-patterns/66-forward-ref-with-generics.explainer.2.tsx", + "name": "/src/08-advanced-patterns/66-forward-ref-with-generics.explainer.2.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/08-advanced-patterns/66-forward-ref-with-generics.explainer.3.ts", + "name": "/src/08-advanced-patterns/66-forward-ref-with-generics.explainer.3.ts", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/08-advanced-patterns/67-forward-ref-as-local-function.problem.tsx", + "name": "/src/08-advanced-patterns/67-forward-ref-as-local-function.problem.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/08-advanced-patterns/67-forward-ref-as-local-function.solution.tsx", + "name": "/src/08-advanced-patterns/67-forward-ref-as-local-function.solution.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/08-advanced-patterns/68-hoc.problem.tsx", + "name": "/src/08-advanced-patterns/68-hoc.problem.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/08-advanced-patterns/68-hoc.solution.tsx", + "name": "/src/08-advanced-patterns/68-hoc.solution.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/08-advanced-patterns/69-record-of-components-with-same-props.problem.tsx", + "name": "/src/08-advanced-patterns/69-record-of-components-with-same-props.problem.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/08-advanced-patterns/69-record-of-components-with-same-props.solution.1.tsx", + "name": "/src/08-advanced-patterns/69-record-of-components-with-same-props.solution.1.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/08-advanced-patterns/69-record-of-components-with-same-props.solution.2.tsx", + "name": "/src/08-advanced-patterns/69-record-of-components-with-same-props.solution.2.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/08-advanced-patterns/70-as-prop.problem.tsx", + "name": "/src/08-advanced-patterns/70-as-prop.problem.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/08-advanced-patterns/70-as-prop.solution.1.tsx", + "name": "/src/08-advanced-patterns/70-as-prop.solution.1.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/08-advanced-patterns/70-as-prop.solution.2.tsx", + "name": "/src/08-advanced-patterns/70-as-prop.solution.2.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/08-advanced-patterns/71-as-prop-with-custom-components.problem.tsx", + "name": "/src/08-advanced-patterns/71-as-prop-with-custom-components.problem.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/08-advanced-patterns/71-as-prop-with-custom-components.solution.tsx", + "name": "/src/08-advanced-patterns/71-as-prop-with-custom-components.solution.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/08-advanced-patterns/72-as-prop-with-default.problem.tsx", + "name": "/src/08-advanced-patterns/72-as-prop-with-default.problem.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/08-advanced-patterns/72-as-prop-with-default.solution.tsx", + "name": "/src/08-advanced-patterns/72-as-prop-with-default.solution.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "Cannot read properties of null (reading 'useRef')", + "name": "/src/09-external-libraries/73-react-hook-form.explainer.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "Cannot read properties of null (reading 'useRef')", + "name": "/src/09-external-libraries/74-react-hook-form-wrapper.problem.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "Cannot read properties of null (reading 'useRef')", + "name": "/src/09-external-libraries/74-react-hook-form-wrapper.solution.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/09-external-libraries/75-react-select.problem.tsx", + "name": "/src/09-external-libraries/75-react-select.problem.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "No test found in suite src/09-external-libraries/75-react-select.solution.tsx", + "name": "/src/09-external-libraries/75-react-select.solution.tsx", + "status": "passed", + }, + { + "assertionResults": [], + "message": "Cannot read properties of null (reading 'useContext')", + "name": "/src/09-external-libraries/76-react-query.explainer.ts", + "status": "passed", + }, + { + "assertionResults": [], + "message": "Cannot read properties of null (reading 'useContext')", + "name": "/src/09-external-libraries/77-react-query-wrapper.problem.ts", + "status": "passed", + }, + { + "assertionResults": [], + "message": "Cannot read properties of null (reading 'useContext')", + "name": "/src/09-external-libraries/77-react-query-wrapper.solution.ts", + "status": "passed", + }, + ], +} +`; diff --git a/scripts/tests/all.test.ts b/scripts/tests/all.test.ts new file mode 100644 index 0000000..fe5ea8d --- /dev/null +++ b/scripts/tests/all.test.ts @@ -0,0 +1,51 @@ +import path from "path"; +import { describe, expect, it } from "vitest"; +import { execSync } from "child_process"; +import { cleanVitestOutput } from "./cleanVitestOutput"; + +const rootFolder = path.resolve(__dirname, "../.."); + +const sanitizeForRegex = (str: string) => { + return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string +}; + +describe("tsc", async () => { + it("Should have the correct TypeScript errors", () => { + let result: string; + + try { + result = execSync(`npx tsc`, { + cwd: rootFolder, + }).toString(); + } catch (error) { + result = error.output.toString(); + } + + result = result.replace(new RegExp(sanitizeForRegex(rootFolder), "g"), ""); + + expect(result).toMatchSnapshot(); + }); +}); + +describe("vitest", async () => { + it("Should have the correct Vitest errors", () => { + let result: string; + + try { + result = execSync(`npx vitest run --reporter=json`, { + cwd: rootFolder, + stdio: "pipe", + }).toString(); + } catch (error) { + result = error.output.toString(); + } + + result = result.replace(new RegExp(sanitizeForRegex(rootFolder), "g"), ""); + + expect( + cleanVitestOutput(result, { + rootFolder, + }), + ).toMatchSnapshot(); + }); +}); diff --git a/scripts/tests/cleanVitestOutput.ts b/scripts/tests/cleanVitestOutput.ts new file mode 100644 index 0000000..81efa6b --- /dev/null +++ b/scripts/tests/cleanVitestOutput.ts @@ -0,0 +1,61 @@ +import path from "path"; + +export const cleanVitestOutput = ( + result: string, + context: { + rootFolder: string; + }, +) => { + const asJson: { + startTime?: number; + endTime?: number; + duration?: number; + numFailedTestSuites?: number; + numFailedTests?: number; + numPassedTestSuites?: number; + numPassedTests?: number; + numPendingTestSuites?: number; + numPendingTests?: number; + numTodoTests?: number; + numTotalTestSuites?: number; + numTotalTests?: number; + testResults: { + name: string; + startTime?: number; + endTime?: number; + duration?: number; + assertionResults: { + duration?: number; + }[]; + }[]; + } = JSON.parse(result.slice(1, -1)); + + delete asJson.startTime; + delete asJson.endTime; + delete asJson.duration; + delete asJson.numFailedTestSuites; + delete asJson.numFailedTests; + delete asJson.numPassedTestSuites; + delete asJson.numPassedTests; + delete asJson.numPendingTestSuites; + delete asJson.numPendingTests; + delete asJson.numTodoTests; + delete asJson.numTotalTestSuites; + delete asJson.numTotalTests; + + asJson.testResults.forEach((testResult) => { + delete testResult.startTime; + delete testResult.endTime; + delete testResult.duration; + + // testResult.name = path.relative(context.rootFolder, testResult.name); + + testResult.assertionResults.forEach((assertionResult) => { + delete assertionResult.duration; + }); + }); + + asJson.testResults.sort((a, b) => a.name.localeCompare(b.name)); + + return asJson; +}; diff --git a/scripts/tests/vite.config.ts b/scripts/tests/vite.config.ts new file mode 100644 index 0000000..8fb6f2d --- /dev/null +++ b/scripts/tests/vite.config.ts @@ -0,0 +1,3 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({}); diff --git a/src/010-typescript-in-the-build-process/010-typescript-in-the-browser.problem/example.ts b/src/010-typescript-in-the-build-process/010-typescript-in-the-browser.problem/example.ts new file mode 100644 index 0000000..09e34e9 --- /dev/null +++ b/src/010-typescript-in-the-build-process/010-typescript-in-the-browser.problem/example.ts @@ -0,0 +1,5 @@ +const run = (message: string) => { + console.log(message); +}; + +run("Hello!"); diff --git a/src/010-typescript-in-the-build-process/010-typescript-in-the-browser.problem/index.html b/src/010-typescript-in-the-build-process/010-typescript-in-the-browser.problem/index.html new file mode 100644 index 0000000..39cdd4e --- /dev/null +++ b/src/010-typescript-in-the-build-process/010-typescript-in-the-browser.problem/index.html @@ -0,0 +1,11 @@ + + + + + + My App + + + + + diff --git a/src/010-typescript-in-the-build-process/010-typescript-in-the-browser.solution/example.js b/src/010-typescript-in-the-build-process/010-typescript-in-the-browser.solution/example.js new file mode 100644 index 0000000..85f0f81 --- /dev/null +++ b/src/010-typescript-in-the-build-process/010-typescript-in-the-browser.solution/example.js @@ -0,0 +1,5 @@ +const run = (message) => { + console.log(message); +}; + +run("Hello!"); diff --git a/src/010-typescript-in-the-build-process/010-typescript-in-the-browser.solution/index.html b/src/010-typescript-in-the-build-process/010-typescript-in-the-browser.solution/index.html new file mode 100644 index 0000000..f51d0df --- /dev/null +++ b/src/010-typescript-in-the-build-process/010-typescript-in-the-browser.solution/index.html @@ -0,0 +1,11 @@ + + + + + + My App + + + + + diff --git a/src/010-typescript-in-the-build-process/011-compile-typescript-to-javascript.problem/example.ts b/src/010-typescript-in-the-build-process/011-compile-typescript-to-javascript.problem/example.ts new file mode 100644 index 0000000..09e34e9 --- /dev/null +++ b/src/010-typescript-in-the-build-process/011-compile-typescript-to-javascript.problem/example.ts @@ -0,0 +1,5 @@ +const run = (message: string) => { + console.log(message); +}; + +run("Hello!"); diff --git a/src/010-typescript-in-the-build-process/011-compile-typescript-to-javascript.problem/index.html b/src/010-typescript-in-the-build-process/011-compile-typescript-to-javascript.problem/index.html new file mode 100644 index 0000000..39cdd4e --- /dev/null +++ b/src/010-typescript-in-the-build-process/011-compile-typescript-to-javascript.problem/index.html @@ -0,0 +1,11 @@ + + + + + + My App + + + + + diff --git a/src/010-typescript-in-the-build-process/011-compile-typescript-to-javascript.solution/.gitignore b/src/010-typescript-in-the-build-process/011-compile-typescript-to-javascript.solution/.gitignore new file mode 100644 index 0000000..4c43fe6 --- /dev/null +++ b/src/010-typescript-in-the-build-process/011-compile-typescript-to-javascript.solution/.gitignore @@ -0,0 +1 @@ +*.js \ No newline at end of file diff --git a/src/010-typescript-in-the-build-process/011-compile-typescript-to-javascript.solution/example.ts b/src/010-typescript-in-the-build-process/011-compile-typescript-to-javascript.solution/example.ts new file mode 100644 index 0000000..09e34e9 --- /dev/null +++ b/src/010-typescript-in-the-build-process/011-compile-typescript-to-javascript.solution/example.ts @@ -0,0 +1,5 @@ +const run = (message: string) => { + console.log(message); +}; + +run("Hello!"); diff --git a/src/010-typescript-in-the-build-process/011-compile-typescript-to-javascript.solution/index.html b/src/010-typescript-in-the-build-process/011-compile-typescript-to-javascript.solution/index.html new file mode 100644 index 0000000..f51d0df --- /dev/null +++ b/src/010-typescript-in-the-build-process/011-compile-typescript-to-javascript.solution/index.html @@ -0,0 +1,11 @@ + + + + + + My App + + + + + diff --git a/src/010-typescript-in-the-build-process/011-compile-typescript-to-javascript.solution/tsconfig.json b/src/010-typescript-in-the-build-process/011-compile-typescript-to-javascript.solution/tsconfig.json new file mode 100644 index 0000000..75dcaea --- /dev/null +++ b/src/010-typescript-in-the-build-process/011-compile-typescript-to-javascript.solution/tsconfig.json @@ -0,0 +1,103 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig to read more about this file */ + + /* Projects */ + // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ + // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ + // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ + // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ + // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ + + /* Language and Environment */ + "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "jsx": "preserve", /* Specify what JSX code is generated. */ + // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ + // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ + // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ + // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ + // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ + // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + + /* Modules */ + "module": "commonjs", /* Specify what module code is generated. */ + // "rootDir": "./", /* Specify the root folder within your source files. */ + // "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ + // "types": [], /* Specify type package names to be included without being referenced in a source file. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ + // "resolveJsonModule": true, /* Enable importing .json files. */ + // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ + + /* JavaScript Support */ + // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ + + /* Emit */ + // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + // "declarationMap": true, /* Create sourcemaps for d.ts files. */ + // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ + // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ + // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ + // "outDir": "./", /* Specify an output folder for all emitted files. */ + // "removeComments": true, /* Disable emitting comments. */ + // "noEmit": true, /* Disable emitting files from a compilation. */ + // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ + // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ + // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ + // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ + // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ + // "newLine": "crlf", /* Set the newline character for emitting files. */ + // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ + // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ + // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ + // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ + // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ + // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ + + /* Interop Constraints */ + // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ + // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ + // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ + + /* Type Checking */ + "strict": true, /* Enable all strict type-checking options. */ + // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ + // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ + // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ + // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ + // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ + // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ + // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ + // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ + // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ + // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ + // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ + // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ + // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ + // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ + // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ + // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ + // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ + + /* Completeness */ + // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ + "skipLibCheck": true /* Skip type checking all .d.ts files. */ + } +} diff --git a/src/010-typescript-in-the-build-process/012-tsc-watch-mode.problem/.gitignore b/src/010-typescript-in-the-build-process/012-tsc-watch-mode.problem/.gitignore new file mode 100644 index 0000000..4c43fe6 --- /dev/null +++ b/src/010-typescript-in-the-build-process/012-tsc-watch-mode.problem/.gitignore @@ -0,0 +1 @@ +*.js \ No newline at end of file diff --git a/src/010-typescript-in-the-build-process/012-tsc-watch-mode.problem/example.ts b/src/010-typescript-in-the-build-process/012-tsc-watch-mode.problem/example.ts new file mode 100644 index 0000000..09e34e9 --- /dev/null +++ b/src/010-typescript-in-the-build-process/012-tsc-watch-mode.problem/example.ts @@ -0,0 +1,5 @@ +const run = (message: string) => { + console.log(message); +}; + +run("Hello!"); diff --git a/src/010-typescript-in-the-build-process/012-tsc-watch-mode.problem/index.html b/src/010-typescript-in-the-build-process/012-tsc-watch-mode.problem/index.html new file mode 100644 index 0000000..f51d0df --- /dev/null +++ b/src/010-typescript-in-the-build-process/012-tsc-watch-mode.problem/index.html @@ -0,0 +1,11 @@ + + + + + + My App + + + + + diff --git a/src/010-typescript-in-the-build-process/012-tsc-watch-mode.problem/tsconfig.json b/src/010-typescript-in-the-build-process/012-tsc-watch-mode.problem/tsconfig.json new file mode 100644 index 0000000..68a773d --- /dev/null +++ b/src/010-typescript-in-the-build-process/012-tsc-watch-mode.problem/tsconfig.json @@ -0,0 +1,95 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig to read more about this file */ + /* Projects */ + // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ + // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ + // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ + // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ + // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ + /* Language and Environment */ + "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "jsx": "preserve", /* Specify what JSX code is generated. */ + // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ + // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ + // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ + // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ + // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ + // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + /* Modules */ + "module": "commonjs", /* Specify what module code is generated. */ + // "rootDir": "./", /* Specify the root folder within your source files. */ + // "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ + // "types": [], /* Specify type package names to be included without being referenced in a source file. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ + // "resolveJsonModule": true, /* Enable importing .json files. */ + // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ + /* JavaScript Support */ + // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ + /* Emit */ + // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + // "declarationMap": true, /* Create sourcemaps for d.ts files. */ + // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ + // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ + // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ + // "outDir": "./", /* Specify an output folder for all emitted files. */ + // "removeComments": true, /* Disable emitting comments. */ + // "noEmit": true, /* Disable emitting files from a compilation. */ + // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ + // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ + // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ + // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ + // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ + // "newLine": "crlf", /* Set the newline character for emitting files. */ + // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ + // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ + // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ + // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ + // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ + // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ + /* Interop Constraints */ + // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ + // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ + // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ + /* Type Checking */ + "strict": true, /* Enable all strict type-checking options. */ + // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ + // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ + // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ + // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ + // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ + // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ + // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ + // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ + // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ + // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ + // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ + // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ + // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ + // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ + // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ + // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ + // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ + /* Completeness */ + // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ + "skipLibCheck": true /* Skip type checking all .d.ts files. */ + } +} \ No newline at end of file diff --git a/src/010-typescript-in-the-build-process/012-tsc-watch-mode.solution/.gitignore b/src/010-typescript-in-the-build-process/012-tsc-watch-mode.solution/.gitignore new file mode 100644 index 0000000..4c43fe6 --- /dev/null +++ b/src/010-typescript-in-the-build-process/012-tsc-watch-mode.solution/.gitignore @@ -0,0 +1 @@ +*.js \ No newline at end of file diff --git a/src/010-typescript-in-the-build-process/012-tsc-watch-mode.solution/example.ts b/src/010-typescript-in-the-build-process/012-tsc-watch-mode.solution/example.ts new file mode 100644 index 0000000..09e34e9 --- /dev/null +++ b/src/010-typescript-in-the-build-process/012-tsc-watch-mode.solution/example.ts @@ -0,0 +1,5 @@ +const run = (message: string) => { + console.log(message); +}; + +run("Hello!"); diff --git a/src/010-typescript-in-the-build-process/012-tsc-watch-mode.solution/index.html b/src/010-typescript-in-the-build-process/012-tsc-watch-mode.solution/index.html new file mode 100644 index 0000000..f51d0df --- /dev/null +++ b/src/010-typescript-in-the-build-process/012-tsc-watch-mode.solution/index.html @@ -0,0 +1,11 @@ + + + + + + My App + + + + + diff --git a/src/010-typescript-in-the-build-process/012-tsc-watch-mode.solution/tsconfig.json b/src/010-typescript-in-the-build-process/012-tsc-watch-mode.solution/tsconfig.json new file mode 100644 index 0000000..68a773d --- /dev/null +++ b/src/010-typescript-in-the-build-process/012-tsc-watch-mode.solution/tsconfig.json @@ -0,0 +1,95 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig to read more about this file */ + /* Projects */ + // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ + // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ + // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ + // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ + // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ + /* Language and Environment */ + "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "jsx": "preserve", /* Specify what JSX code is generated. */ + // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ + // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ + // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ + // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ + // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ + // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + /* Modules */ + "module": "commonjs", /* Specify what module code is generated. */ + // "rootDir": "./", /* Specify the root folder within your source files. */ + // "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ + // "types": [], /* Specify type package names to be included without being referenced in a source file. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ + // "resolveJsonModule": true, /* Enable importing .json files. */ + // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ + /* JavaScript Support */ + // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ + /* Emit */ + // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + // "declarationMap": true, /* Create sourcemaps for d.ts files. */ + // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ + // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ + // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ + // "outDir": "./", /* Specify an output folder for all emitted files. */ + // "removeComments": true, /* Disable emitting comments. */ + // "noEmit": true, /* Disable emitting files from a compilation. */ + // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ + // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ + // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ + // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ + // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ + // "newLine": "crlf", /* Set the newline character for emitting files. */ + // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ + // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ + // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ + // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ + // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ + // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ + /* Interop Constraints */ + // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ + // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ + // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ + /* Type Checking */ + "strict": true, /* Enable all strict type-checking options. */ + // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ + // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ + // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ + // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ + // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ + // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ + // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ + // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ + // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ + // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ + // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ + // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ + // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ + // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ + // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ + // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ + // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ + /* Completeness */ + // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ + "skipLibCheck": true /* Skip type checking all .d.ts files. */ + } +} \ No newline at end of file diff --git a/src/010-typescript-in-the-build-process/013-compiling-to-a-directory.problem/.gitignore b/src/010-typescript-in-the-build-process/013-compiling-to-a-directory.problem/.gitignore new file mode 100644 index 0000000..4c43fe6 --- /dev/null +++ b/src/010-typescript-in-the-build-process/013-compiling-to-a-directory.problem/.gitignore @@ -0,0 +1 @@ +*.js \ No newline at end of file diff --git a/src/010-typescript-in-the-build-process/013-compiling-to-a-directory.problem/example.ts b/src/010-typescript-in-the-build-process/013-compiling-to-a-directory.problem/example.ts new file mode 100644 index 0000000..09e34e9 --- /dev/null +++ b/src/010-typescript-in-the-build-process/013-compiling-to-a-directory.problem/example.ts @@ -0,0 +1,5 @@ +const run = (message: string) => { + console.log(message); +}; + +run("Hello!"); diff --git a/src/010-typescript-in-the-build-process/013-compiling-to-a-directory.problem/index.html b/src/010-typescript-in-the-build-process/013-compiling-to-a-directory.problem/index.html new file mode 100644 index 0000000..f51d0df --- /dev/null +++ b/src/010-typescript-in-the-build-process/013-compiling-to-a-directory.problem/index.html @@ -0,0 +1,11 @@ + + + + + + My App + + + + + diff --git a/src/010-typescript-in-the-build-process/013-compiling-to-a-directory.problem/tsconfig.json b/src/010-typescript-in-the-build-process/013-compiling-to-a-directory.problem/tsconfig.json new file mode 100644 index 0000000..68a773d --- /dev/null +++ b/src/010-typescript-in-the-build-process/013-compiling-to-a-directory.problem/tsconfig.json @@ -0,0 +1,95 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig to read more about this file */ + /* Projects */ + // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ + // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ + // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ + // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ + // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ + /* Language and Environment */ + "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "jsx": "preserve", /* Specify what JSX code is generated. */ + // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ + // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ + // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ + // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ + // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ + // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + /* Modules */ + "module": "commonjs", /* Specify what module code is generated. */ + // "rootDir": "./", /* Specify the root folder within your source files. */ + // "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ + // "types": [], /* Specify type package names to be included without being referenced in a source file. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ + // "resolveJsonModule": true, /* Enable importing .json files. */ + // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ + /* JavaScript Support */ + // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ + /* Emit */ + // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + // "declarationMap": true, /* Create sourcemaps for d.ts files. */ + // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ + // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ + // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ + // "outDir": "./", /* Specify an output folder for all emitted files. */ + // "removeComments": true, /* Disable emitting comments. */ + // "noEmit": true, /* Disable emitting files from a compilation. */ + // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ + // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ + // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ + // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ + // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ + // "newLine": "crlf", /* Set the newline character for emitting files. */ + // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ + // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ + // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ + // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ + // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ + // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ + /* Interop Constraints */ + // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ + // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ + // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ + /* Type Checking */ + "strict": true, /* Enable all strict type-checking options. */ + // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ + // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ + // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ + // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ + // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ + // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ + // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ + // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ + // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ + // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ + // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ + // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ + // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ + // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ + // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ + // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ + // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ + /* Completeness */ + // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ + "skipLibCheck": true /* Skip type checking all .d.ts files. */ + } +} \ No newline at end of file diff --git a/src/010-typescript-in-the-build-process/013-compiling-to-a-directory.solution/.gitignore b/src/010-typescript-in-the-build-process/013-compiling-to-a-directory.solution/.gitignore new file mode 100644 index 0000000..53c37a1 --- /dev/null +++ b/src/010-typescript-in-the-build-process/013-compiling-to-a-directory.solution/.gitignore @@ -0,0 +1 @@ +dist \ No newline at end of file diff --git a/src/010-typescript-in-the-build-process/013-compiling-to-a-directory.solution/example.ts b/src/010-typescript-in-the-build-process/013-compiling-to-a-directory.solution/example.ts new file mode 100644 index 0000000..09e34e9 --- /dev/null +++ b/src/010-typescript-in-the-build-process/013-compiling-to-a-directory.solution/example.ts @@ -0,0 +1,5 @@ +const run = (message: string) => { + console.log(message); +}; + +run("Hello!"); diff --git a/src/010-typescript-in-the-build-process/013-compiling-to-a-directory.solution/index.html b/src/010-typescript-in-the-build-process/013-compiling-to-a-directory.solution/index.html new file mode 100644 index 0000000..7202bf0 --- /dev/null +++ b/src/010-typescript-in-the-build-process/013-compiling-to-a-directory.solution/index.html @@ -0,0 +1,11 @@ + + + + + + My App + + + + + diff --git a/src/010-typescript-in-the-build-process/013-compiling-to-a-directory.solution/tsconfig.json b/src/010-typescript-in-the-build-process/013-compiling-to-a-directory.solution/tsconfig.json new file mode 100644 index 0000000..0bb8d58 --- /dev/null +++ b/src/010-typescript-in-the-build-process/013-compiling-to-a-directory.solution/tsconfig.json @@ -0,0 +1,95 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig to read more about this file */ + /* Projects */ + // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ + // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ + // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ + // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ + // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ + /* Language and Environment */ + "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "jsx": "preserve", /* Specify what JSX code is generated. */ + // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ + // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ + // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ + // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ + // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ + // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + /* Modules */ + "module": "commonjs", /* Specify what module code is generated. */ + // "rootDir": "./", /* Specify the root folder within your source files. */ + // "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ + // "types": [], /* Specify type package names to be included without being referenced in a source file. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ + // "resolveJsonModule": true, /* Enable importing .json files. */ + // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ + /* JavaScript Support */ + // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ + /* Emit */ + // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + // "declarationMap": true, /* Create sourcemaps for d.ts files. */ + // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ + // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ + // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ + "outDir": "./dist", /* Specify an output folder for all emitted files. */ + // "removeComments": true, /* Disable emitting comments. */ + // "noEmit": true, /* Disable emitting files from a compilation. */ + // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ + // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ + // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ + // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ + // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ + // "newLine": "crlf", /* Set the newline character for emitting files. */ + // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ + // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ + // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ + // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ + // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ + // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ + /* Interop Constraints */ + // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ + // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ + // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ + /* Type Checking */ + "strict": true, /* Enable all strict type-checking options. */ + // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ + // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ + // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ + // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ + // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ + // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ + // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ + // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ + // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ + // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ + // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ + // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ + // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ + // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ + // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ + // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ + // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ + /* Completeness */ + // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ + "skipLibCheck": true /* Skip type checking all .d.ts files. */ + } +} \ No newline at end of file diff --git a/src/010-typescript-in-the-build-process/014-setting-up-a-frontend-app-with-vite.problem/.gitignore b/src/010-typescript-in-the-build-process/014-setting-up-a-frontend-app-with-vite.problem/.gitignore new file mode 100644 index 0000000..53c37a1 --- /dev/null +++ b/src/010-typescript-in-the-build-process/014-setting-up-a-frontend-app-with-vite.problem/.gitignore @@ -0,0 +1 @@ +dist \ No newline at end of file diff --git a/src/010-typescript-in-the-build-process/014-setting-up-a-frontend-app-with-vite.problem/example.ts b/src/010-typescript-in-the-build-process/014-setting-up-a-frontend-app-with-vite.problem/example.ts new file mode 100644 index 0000000..09e34e9 --- /dev/null +++ b/src/010-typescript-in-the-build-process/014-setting-up-a-frontend-app-with-vite.problem/example.ts @@ -0,0 +1,5 @@ +const run = (message: string) => { + console.log(message); +}; + +run("Hello!"); diff --git a/src/010-typescript-in-the-build-process/014-setting-up-a-frontend-app-with-vite.problem/index.html b/src/010-typescript-in-the-build-process/014-setting-up-a-frontend-app-with-vite.problem/index.html new file mode 100644 index 0000000..889a61f --- /dev/null +++ b/src/010-typescript-in-the-build-process/014-setting-up-a-frontend-app-with-vite.problem/index.html @@ -0,0 +1,5 @@ + + + + + diff --git a/src/010-typescript-in-the-build-process/014-setting-up-a-frontend-app-with-vite.problem/tsconfig.json b/src/010-typescript-in-the-build-process/014-setting-up-a-frontend-app-with-vite.problem/tsconfig.json new file mode 100644 index 0000000..0bb8d58 --- /dev/null +++ b/src/010-typescript-in-the-build-process/014-setting-up-a-frontend-app-with-vite.problem/tsconfig.json @@ -0,0 +1,95 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig to read more about this file */ + /* Projects */ + // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ + // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ + // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ + // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ + // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ + /* Language and Environment */ + "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "jsx": "preserve", /* Specify what JSX code is generated. */ + // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ + // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ + // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ + // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ + // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ + // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + /* Modules */ + "module": "commonjs", /* Specify what module code is generated. */ + // "rootDir": "./", /* Specify the root folder within your source files. */ + // "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ + // "types": [], /* Specify type package names to be included without being referenced in a source file. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ + // "resolveJsonModule": true, /* Enable importing .json files. */ + // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ + /* JavaScript Support */ + // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ + /* Emit */ + // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + // "declarationMap": true, /* Create sourcemaps for d.ts files. */ + // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ + // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ + // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ + "outDir": "./dist", /* Specify an output folder for all emitted files. */ + // "removeComments": true, /* Disable emitting comments. */ + // "noEmit": true, /* Disable emitting files from a compilation. */ + // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ + // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ + // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ + // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ + // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ + // "newLine": "crlf", /* Set the newline character for emitting files. */ + // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ + // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ + // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ + // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ + // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ + // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ + /* Interop Constraints */ + // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ + // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ + // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ + /* Type Checking */ + "strict": true, /* Enable all strict type-checking options. */ + // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ + // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ + // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ + // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ + // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ + // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ + // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ + // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ + // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ + // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ + // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ + // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ + // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ + // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ + // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ + // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ + // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ + /* Completeness */ + // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ + "skipLibCheck": true /* Skip type checking all .d.ts files. */ + } +} \ No newline at end of file diff --git a/src/010-typescript-in-the-build-process/014-setting-up-a-frontend-app-with-vite.solution/.gitignore b/src/010-typescript-in-the-build-process/014-setting-up-a-frontend-app-with-vite.solution/.gitignore new file mode 100644 index 0000000..a547bf3 --- /dev/null +++ b/src/010-typescript-in-the-build-process/014-setting-up-a-frontend-app-with-vite.solution/.gitignore @@ -0,0 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/src/010-typescript-in-the-build-process/014-setting-up-a-frontend-app-with-vite.solution/index.html b/src/010-typescript-in-the-build-process/014-setting-up-a-frontend-app-with-vite.solution/index.html new file mode 100644 index 0000000..f86e483 --- /dev/null +++ b/src/010-typescript-in-the-build-process/014-setting-up-a-frontend-app-with-vite.solution/index.html @@ -0,0 +1,13 @@ + + + + + + + Vite + TS + + + + + + diff --git a/src/010-typescript-in-the-build-process/014-setting-up-a-frontend-app-with-vite.solution/package.json b/src/010-typescript-in-the-build-process/014-setting-up-a-frontend-app-with-vite.solution/package.json new file mode 100644 index 0000000..c9a6741 --- /dev/null +++ b/src/010-typescript-in-the-build-process/014-setting-up-a-frontend-app-with-vite.solution/package.json @@ -0,0 +1,15 @@ +{ + "name": "013-setting-up-a-frontend-app-with-vite.solution", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc && vite build", + "preview": "vite preview" + }, + "devDependencies": { + "typescript": "^5.0.2", + "vite": "^4.4.5" + } +} diff --git a/src/010-typescript-in-the-build-process/014-setting-up-a-frontend-app-with-vite.solution/pnpm-lock.yaml b/src/010-typescript-in-the-build-process/014-setting-up-a-frontend-app-with-vite.solution/pnpm-lock.yaml new file mode 100644 index 0000000..9af6dfc --- /dev/null +++ b/src/010-typescript-in-the-build-process/014-setting-up-a-frontend-app-with-vite.solution/pnpm-lock.yaml @@ -0,0 +1,320 @@ +lockfileVersion: 5.4 + +specifiers: + typescript: ^5.0.2 + vite: ^4.4.5 + +devDependencies: + typescript: 5.1.6 + vite: 4.4.9 + +packages: + + /@esbuild/android-arm/0.18.20: + resolution: {integrity: sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-arm64/0.18.20: + resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-x64/0.18.20: + resolution: {integrity: sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-arm64/0.18.20: + resolution: {integrity: sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-x64/0.18.20: + resolution: {integrity: sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-arm64/0.18.20: + resolution: {integrity: sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-x64/0.18.20: + resolution: {integrity: sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm/0.18.20: + resolution: {integrity: sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm64/0.18.20: + resolution: {integrity: sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ia32/0.18.20: + resolution: {integrity: sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-loong64/0.18.20: + resolution: {integrity: sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-mips64el/0.18.20: + resolution: {integrity: sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ppc64/0.18.20: + resolution: {integrity: sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-riscv64/0.18.20: + resolution: {integrity: sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-s390x/0.18.20: + resolution: {integrity: sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-x64/0.18.20: + resolution: {integrity: sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/netbsd-x64/0.18.20: + resolution: {integrity: sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/openbsd-x64/0.18.20: + resolution: {integrity: sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/sunos-x64/0.18.20: + resolution: {integrity: sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-arm64/0.18.20: + resolution: {integrity: sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-ia32/0.18.20: + resolution: {integrity: sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-x64/0.18.20: + resolution: {integrity: sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /esbuild/0.18.20: + resolution: {integrity: sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@esbuild/android-arm': 0.18.20 + '@esbuild/android-arm64': 0.18.20 + '@esbuild/android-x64': 0.18.20 + '@esbuild/darwin-arm64': 0.18.20 + '@esbuild/darwin-x64': 0.18.20 + '@esbuild/freebsd-arm64': 0.18.20 + '@esbuild/freebsd-x64': 0.18.20 + '@esbuild/linux-arm': 0.18.20 + '@esbuild/linux-arm64': 0.18.20 + '@esbuild/linux-ia32': 0.18.20 + '@esbuild/linux-loong64': 0.18.20 + '@esbuild/linux-mips64el': 0.18.20 + '@esbuild/linux-ppc64': 0.18.20 + '@esbuild/linux-riscv64': 0.18.20 + '@esbuild/linux-s390x': 0.18.20 + '@esbuild/linux-x64': 0.18.20 + '@esbuild/netbsd-x64': 0.18.20 + '@esbuild/openbsd-x64': 0.18.20 + '@esbuild/sunos-x64': 0.18.20 + '@esbuild/win32-arm64': 0.18.20 + '@esbuild/win32-ia32': 0.18.20 + '@esbuild/win32-x64': 0.18.20 + dev: true + + /fsevents/2.3.2: + resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /nanoid/3.3.6: + resolution: {integrity: sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + dev: true + + /picocolors/1.0.0: + resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} + dev: true + + /postcss/8.4.27: + resolution: {integrity: sha512-gY/ACJtJPSmUFPDCHtX78+01fHa64FaU4zaaWfuh1MhGJISufJAH4cun6k/8fwsHYeK4UQmENQK+tRLCFJE8JQ==} + engines: {node: ^10 || ^12 || >=14} + dependencies: + nanoid: 3.3.6 + picocolors: 1.0.0 + source-map-js: 1.0.2 + dev: true + + /rollup/3.28.0: + resolution: {integrity: sha512-d7zhvo1OUY2SXSM6pfNjgD5+d0Nz87CUp4mt8l/GgVP3oBsPwzNvSzyu1me6BSG9JIgWNTVcafIXBIyM8yQ3yw==} + engines: {node: '>=14.18.0', npm: '>=8.0.0'} + hasBin: true + optionalDependencies: + fsevents: 2.3.2 + dev: true + + /source-map-js/1.0.2: + resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} + engines: {node: '>=0.10.0'} + dev: true + + /typescript/5.1.6: + resolution: {integrity: sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==} + engines: {node: '>=14.17'} + hasBin: true + dev: true + + /vite/4.4.9: + resolution: {integrity: sha512-2mbUn2LlUmNASWwSCNSJ/EG2HuSRTnVNaydp6vMCm5VIqJsjMfbIWtbH2kDuwUVW5mMUKKZvGPX/rqeqVvv1XA==} + engines: {node: ^14.18.0 || >=16.0.0} + hasBin: true + peerDependencies: + '@types/node': '>= 14' + less: '*' + lightningcss: ^1.21.0 + sass: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + dependencies: + esbuild: 0.18.20 + postcss: 8.4.27 + rollup: 3.28.0 + optionalDependencies: + fsevents: 2.3.2 + dev: true diff --git a/src/010-typescript-in-the-build-process/014-setting-up-a-frontend-app-with-vite.solution/public/vite.svg b/src/010-typescript-in-the-build-process/014-setting-up-a-frontend-app-with-vite.solution/public/vite.svg new file mode 100644 index 0000000..e7b8dfb --- /dev/null +++ b/src/010-typescript-in-the-build-process/014-setting-up-a-frontend-app-with-vite.solution/public/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/010-typescript-in-the-build-process/014-setting-up-a-frontend-app-with-vite.solution/src/counter.ts b/src/010-typescript-in-the-build-process/014-setting-up-a-frontend-app-with-vite.solution/src/counter.ts new file mode 100644 index 0000000..09e5afd --- /dev/null +++ b/src/010-typescript-in-the-build-process/014-setting-up-a-frontend-app-with-vite.solution/src/counter.ts @@ -0,0 +1,9 @@ +export function setupCounter(element: HTMLButtonElement) { + let counter = 0 + const setCounter = (count: number) => { + counter = count + element.innerHTML = `count is ${counter}` + } + element.addEventListener('click', () => setCounter(counter + 1)) + setCounter(0) +} diff --git a/src/010-typescript-in-the-build-process/014-setting-up-a-frontend-app-with-vite.solution/src/main.ts b/src/010-typescript-in-the-build-process/014-setting-up-a-frontend-app-with-vite.solution/src/main.ts new file mode 100644 index 0000000..791547b --- /dev/null +++ b/src/010-typescript-in-the-build-process/014-setting-up-a-frontend-app-with-vite.solution/src/main.ts @@ -0,0 +1,24 @@ +import './style.css' +import typescriptLogo from './typescript.svg' +import viteLogo from '/vite.svg' +import { setupCounter } from './counter.ts' + +document.querySelector('#app')!.innerHTML = ` + + + + + + + + Vite + TypeScript + + + + + Click on the Vite and TypeScript logos to learn more + + +` + +setupCounter(document.querySelector('#counter')!) diff --git a/src/010-typescript-in-the-build-process/014-setting-up-a-frontend-app-with-vite.solution/src/style.css b/src/010-typescript-in-the-build-process/014-setting-up-a-frontend-app-with-vite.solution/src/style.css new file mode 100644 index 0000000..b528b6c --- /dev/null +++ b/src/010-typescript-in-the-build-process/014-setting-up-a-frontend-app-with-vite.solution/src/style.css @@ -0,0 +1,97 @@ +:root { + font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; + line-height: 1.5; + font-weight: 400; + + color-scheme: light dark; + color: rgba(255, 255, 255, 0.87); + background-color: #242424; + + font-synthesis: none; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + -webkit-text-size-adjust: 100%; +} + +a { + font-weight: 500; + color: #646cff; + text-decoration: inherit; +} +a:hover { + color: #535bf2; +} + +body { + margin: 0; + display: flex; + place-items: center; + min-width: 320px; + min-height: 100vh; +} + +h1 { + font-size: 3.2em; + line-height: 1.1; +} + +#app { + max-width: 1280px; + margin: 0 auto; + padding: 2rem; + text-align: center; +} + +.logo { + height: 6em; + padding: 1.5em; + will-change: filter; + transition: filter 300ms; +} +.logo:hover { + filter: drop-shadow(0 0 2em #646cffaa); +} +.logo.vanilla:hover { + filter: drop-shadow(0 0 2em #3178c6aa); +} + +.card { + padding: 2em; +} + +.read-the-docs { + color: #888; +} + +button { + border-radius: 8px; + border: 1px solid transparent; + padding: 0.6em 1.2em; + font-size: 1em; + font-weight: 500; + font-family: inherit; + background-color: #1a1a1a; + cursor: pointer; + transition: border-color 0.25s; +} +button:hover { + border-color: #646cff; +} +button:focus, +button:focus-visible { + outline: 4px auto -webkit-focus-ring-color; +} + +@media (prefers-color-scheme: light) { + :root { + color: #213547; + background-color: #ffffff; + } + a:hover { + color: #747bff; + } + button { + background-color: #f9f9f9; + } +} diff --git a/src/010-typescript-in-the-build-process/014-setting-up-a-frontend-app-with-vite.solution/src/typescript.svg b/src/010-typescript-in-the-build-process/014-setting-up-a-frontend-app-with-vite.solution/src/typescript.svg new file mode 100644 index 0000000..d91c910 --- /dev/null +++ b/src/010-typescript-in-the-build-process/014-setting-up-a-frontend-app-with-vite.solution/src/typescript.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/010-typescript-in-the-build-process/014-setting-up-a-frontend-app-with-vite.solution/src/vite-env.d.ts b/src/010-typescript-in-the-build-process/014-setting-up-a-frontend-app-with-vite.solution/src/vite-env.d.ts new file mode 100644 index 0000000..11f02fe --- /dev/null +++ b/src/010-typescript-in-the-build-process/014-setting-up-a-frontend-app-with-vite.solution/src/vite-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/src/010-typescript-in-the-build-process/014-setting-up-a-frontend-app-with-vite.solution/tsconfig.json b/src/010-typescript-in-the-build-process/014-setting-up-a-frontend-app-with-vite.solution/tsconfig.json new file mode 100644 index 0000000..75abdef --- /dev/null +++ b/src/010-typescript-in-the-build-process/014-setting-up-a-frontend-app-with-vite.solution/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "module": "ESNext", + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src"] +} diff --git a/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.problem/.gitignore b/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.problem/.gitignore new file mode 100644 index 0000000..a547bf3 --- /dev/null +++ b/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.problem/.gitignore @@ -0,0 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.problem/index.html b/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.problem/index.html new file mode 100644 index 0000000..f86e483 --- /dev/null +++ b/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.problem/index.html @@ -0,0 +1,13 @@ + + + + + + + Vite + TS + + + + + + diff --git a/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.problem/package.json b/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.problem/package.json new file mode 100644 index 0000000..c9a6741 --- /dev/null +++ b/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.problem/package.json @@ -0,0 +1,15 @@ +{ + "name": "013-setting-up-a-frontend-app-with-vite.solution", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc && vite build", + "preview": "vite preview" + }, + "devDependencies": { + "typescript": "^5.0.2", + "vite": "^4.4.5" + } +} diff --git a/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.problem/pnpm-lock.yaml b/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.problem/pnpm-lock.yaml new file mode 100644 index 0000000..9af6dfc --- /dev/null +++ b/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.problem/pnpm-lock.yaml @@ -0,0 +1,320 @@ +lockfileVersion: 5.4 + +specifiers: + typescript: ^5.0.2 + vite: ^4.4.5 + +devDependencies: + typescript: 5.1.6 + vite: 4.4.9 + +packages: + + /@esbuild/android-arm/0.18.20: + resolution: {integrity: sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-arm64/0.18.20: + resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-x64/0.18.20: + resolution: {integrity: sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-arm64/0.18.20: + resolution: {integrity: sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-x64/0.18.20: + resolution: {integrity: sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-arm64/0.18.20: + resolution: {integrity: sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-x64/0.18.20: + resolution: {integrity: sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm/0.18.20: + resolution: {integrity: sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm64/0.18.20: + resolution: {integrity: sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ia32/0.18.20: + resolution: {integrity: sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-loong64/0.18.20: + resolution: {integrity: sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-mips64el/0.18.20: + resolution: {integrity: sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ppc64/0.18.20: + resolution: {integrity: sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-riscv64/0.18.20: + resolution: {integrity: sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-s390x/0.18.20: + resolution: {integrity: sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-x64/0.18.20: + resolution: {integrity: sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/netbsd-x64/0.18.20: + resolution: {integrity: sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/openbsd-x64/0.18.20: + resolution: {integrity: sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/sunos-x64/0.18.20: + resolution: {integrity: sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-arm64/0.18.20: + resolution: {integrity: sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-ia32/0.18.20: + resolution: {integrity: sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-x64/0.18.20: + resolution: {integrity: sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /esbuild/0.18.20: + resolution: {integrity: sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@esbuild/android-arm': 0.18.20 + '@esbuild/android-arm64': 0.18.20 + '@esbuild/android-x64': 0.18.20 + '@esbuild/darwin-arm64': 0.18.20 + '@esbuild/darwin-x64': 0.18.20 + '@esbuild/freebsd-arm64': 0.18.20 + '@esbuild/freebsd-x64': 0.18.20 + '@esbuild/linux-arm': 0.18.20 + '@esbuild/linux-arm64': 0.18.20 + '@esbuild/linux-ia32': 0.18.20 + '@esbuild/linux-loong64': 0.18.20 + '@esbuild/linux-mips64el': 0.18.20 + '@esbuild/linux-ppc64': 0.18.20 + '@esbuild/linux-riscv64': 0.18.20 + '@esbuild/linux-s390x': 0.18.20 + '@esbuild/linux-x64': 0.18.20 + '@esbuild/netbsd-x64': 0.18.20 + '@esbuild/openbsd-x64': 0.18.20 + '@esbuild/sunos-x64': 0.18.20 + '@esbuild/win32-arm64': 0.18.20 + '@esbuild/win32-ia32': 0.18.20 + '@esbuild/win32-x64': 0.18.20 + dev: true + + /fsevents/2.3.2: + resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /nanoid/3.3.6: + resolution: {integrity: sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + dev: true + + /picocolors/1.0.0: + resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} + dev: true + + /postcss/8.4.27: + resolution: {integrity: sha512-gY/ACJtJPSmUFPDCHtX78+01fHa64FaU4zaaWfuh1MhGJISufJAH4cun6k/8fwsHYeK4UQmENQK+tRLCFJE8JQ==} + engines: {node: ^10 || ^12 || >=14} + dependencies: + nanoid: 3.3.6 + picocolors: 1.0.0 + source-map-js: 1.0.2 + dev: true + + /rollup/3.28.0: + resolution: {integrity: sha512-d7zhvo1OUY2SXSM6pfNjgD5+d0Nz87CUp4mt8l/GgVP3oBsPwzNvSzyu1me6BSG9JIgWNTVcafIXBIyM8yQ3yw==} + engines: {node: '>=14.18.0', npm: '>=8.0.0'} + hasBin: true + optionalDependencies: + fsevents: 2.3.2 + dev: true + + /source-map-js/1.0.2: + resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} + engines: {node: '>=0.10.0'} + dev: true + + /typescript/5.1.6: + resolution: {integrity: sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==} + engines: {node: '>=14.17'} + hasBin: true + dev: true + + /vite/4.4.9: + resolution: {integrity: sha512-2mbUn2LlUmNASWwSCNSJ/EG2HuSRTnVNaydp6vMCm5VIqJsjMfbIWtbH2kDuwUVW5mMUKKZvGPX/rqeqVvv1XA==} + engines: {node: ^14.18.0 || >=16.0.0} + hasBin: true + peerDependencies: + '@types/node': '>= 14' + less: '*' + lightningcss: ^1.21.0 + sass: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + dependencies: + esbuild: 0.18.20 + postcss: 8.4.27 + rollup: 3.28.0 + optionalDependencies: + fsevents: 2.3.2 + dev: true diff --git a/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.problem/public/vite.svg b/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.problem/public/vite.svg new file mode 100644 index 0000000..e7b8dfb --- /dev/null +++ b/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.problem/public/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.problem/src/counter.ts b/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.problem/src/counter.ts new file mode 100644 index 0000000..09e5afd --- /dev/null +++ b/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.problem/src/counter.ts @@ -0,0 +1,9 @@ +export function setupCounter(element: HTMLButtonElement) { + let counter = 0 + const setCounter = (count: number) => { + counter = count + element.innerHTML = `count is ${counter}` + } + element.addEventListener('click', () => setCounter(counter + 1)) + setCounter(0) +} diff --git a/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.problem/src/main.ts b/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.problem/src/main.ts new file mode 100644 index 0000000..791547b --- /dev/null +++ b/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.problem/src/main.ts @@ -0,0 +1,24 @@ +import './style.css' +import typescriptLogo from './typescript.svg' +import viteLogo from '/vite.svg' +import { setupCounter } from './counter.ts' + +document.querySelector('#app')!.innerHTML = ` + + + + + + + + Vite + TypeScript + + + + + Click on the Vite and TypeScript logos to learn more + + +` + +setupCounter(document.querySelector('#counter')!) diff --git a/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.problem/src/style.css b/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.problem/src/style.css new file mode 100644 index 0000000..b528b6c --- /dev/null +++ b/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.problem/src/style.css @@ -0,0 +1,97 @@ +:root { + font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; + line-height: 1.5; + font-weight: 400; + + color-scheme: light dark; + color: rgba(255, 255, 255, 0.87); + background-color: #242424; + + font-synthesis: none; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + -webkit-text-size-adjust: 100%; +} + +a { + font-weight: 500; + color: #646cff; + text-decoration: inherit; +} +a:hover { + color: #535bf2; +} + +body { + margin: 0; + display: flex; + place-items: center; + min-width: 320px; + min-height: 100vh; +} + +h1 { + font-size: 3.2em; + line-height: 1.1; +} + +#app { + max-width: 1280px; + margin: 0 auto; + padding: 2rem; + text-align: center; +} + +.logo { + height: 6em; + padding: 1.5em; + will-change: filter; + transition: filter 300ms; +} +.logo:hover { + filter: drop-shadow(0 0 2em #646cffaa); +} +.logo.vanilla:hover { + filter: drop-shadow(0 0 2em #3178c6aa); +} + +.card { + padding: 2em; +} + +.read-the-docs { + color: #888; +} + +button { + border-radius: 8px; + border: 1px solid transparent; + padding: 0.6em 1.2em; + font-size: 1em; + font-weight: 500; + font-family: inherit; + background-color: #1a1a1a; + cursor: pointer; + transition: border-color 0.25s; +} +button:hover { + border-color: #646cff; +} +button:focus, +button:focus-visible { + outline: 4px auto -webkit-focus-ring-color; +} + +@media (prefers-color-scheme: light) { + :root { + color: #213547; + background-color: #ffffff; + } + a:hover { + color: #747bff; + } + button { + background-color: #f9f9f9; + } +} diff --git a/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.problem/src/typescript.svg b/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.problem/src/typescript.svg new file mode 100644 index 0000000..d91c910 --- /dev/null +++ b/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.problem/src/typescript.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.problem/src/vite-env.d.ts b/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.problem/src/vite-env.d.ts new file mode 100644 index 0000000..11f02fe --- /dev/null +++ b/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.problem/src/vite-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.problem/tsconfig.json b/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.problem/tsconfig.json new file mode 100644 index 0000000..75abdef --- /dev/null +++ b/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.problem/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "module": "ESNext", + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src"] +} diff --git a/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.solution/.gitignore b/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.solution/.gitignore new file mode 100644 index 0000000..a547bf3 --- /dev/null +++ b/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.solution/.gitignore @@ -0,0 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.solution/index.html b/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.solution/index.html new file mode 100644 index 0000000..f86e483 --- /dev/null +++ b/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.solution/index.html @@ -0,0 +1,13 @@ + + + + + + + Vite + TS + + + + + + diff --git a/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.solution/package.json b/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.solution/package.json new file mode 100644 index 0000000..c9a6741 --- /dev/null +++ b/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.solution/package.json @@ -0,0 +1,15 @@ +{ + "name": "013-setting-up-a-frontend-app-with-vite.solution", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc && vite build", + "preview": "vite preview" + }, + "devDependencies": { + "typescript": "^5.0.2", + "vite": "^4.4.5" + } +} diff --git a/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.solution/pnpm-lock.yaml b/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.solution/pnpm-lock.yaml new file mode 100644 index 0000000..9af6dfc --- /dev/null +++ b/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.solution/pnpm-lock.yaml @@ -0,0 +1,320 @@ +lockfileVersion: 5.4 + +specifiers: + typescript: ^5.0.2 + vite: ^4.4.5 + +devDependencies: + typescript: 5.1.6 + vite: 4.4.9 + +packages: + + /@esbuild/android-arm/0.18.20: + resolution: {integrity: sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-arm64/0.18.20: + resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-x64/0.18.20: + resolution: {integrity: sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-arm64/0.18.20: + resolution: {integrity: sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-x64/0.18.20: + resolution: {integrity: sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-arm64/0.18.20: + resolution: {integrity: sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-x64/0.18.20: + resolution: {integrity: sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm/0.18.20: + resolution: {integrity: sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm64/0.18.20: + resolution: {integrity: sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ia32/0.18.20: + resolution: {integrity: sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-loong64/0.18.20: + resolution: {integrity: sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-mips64el/0.18.20: + resolution: {integrity: sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ppc64/0.18.20: + resolution: {integrity: sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-riscv64/0.18.20: + resolution: {integrity: sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-s390x/0.18.20: + resolution: {integrity: sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-x64/0.18.20: + resolution: {integrity: sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/netbsd-x64/0.18.20: + resolution: {integrity: sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/openbsd-x64/0.18.20: + resolution: {integrity: sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/sunos-x64/0.18.20: + resolution: {integrity: sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-arm64/0.18.20: + resolution: {integrity: sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-ia32/0.18.20: + resolution: {integrity: sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-x64/0.18.20: + resolution: {integrity: sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /esbuild/0.18.20: + resolution: {integrity: sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@esbuild/android-arm': 0.18.20 + '@esbuild/android-arm64': 0.18.20 + '@esbuild/android-x64': 0.18.20 + '@esbuild/darwin-arm64': 0.18.20 + '@esbuild/darwin-x64': 0.18.20 + '@esbuild/freebsd-arm64': 0.18.20 + '@esbuild/freebsd-x64': 0.18.20 + '@esbuild/linux-arm': 0.18.20 + '@esbuild/linux-arm64': 0.18.20 + '@esbuild/linux-ia32': 0.18.20 + '@esbuild/linux-loong64': 0.18.20 + '@esbuild/linux-mips64el': 0.18.20 + '@esbuild/linux-ppc64': 0.18.20 + '@esbuild/linux-riscv64': 0.18.20 + '@esbuild/linux-s390x': 0.18.20 + '@esbuild/linux-x64': 0.18.20 + '@esbuild/netbsd-x64': 0.18.20 + '@esbuild/openbsd-x64': 0.18.20 + '@esbuild/sunos-x64': 0.18.20 + '@esbuild/win32-arm64': 0.18.20 + '@esbuild/win32-ia32': 0.18.20 + '@esbuild/win32-x64': 0.18.20 + dev: true + + /fsevents/2.3.2: + resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /nanoid/3.3.6: + resolution: {integrity: sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + dev: true + + /picocolors/1.0.0: + resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} + dev: true + + /postcss/8.4.27: + resolution: {integrity: sha512-gY/ACJtJPSmUFPDCHtX78+01fHa64FaU4zaaWfuh1MhGJISufJAH4cun6k/8fwsHYeK4UQmENQK+tRLCFJE8JQ==} + engines: {node: ^10 || ^12 || >=14} + dependencies: + nanoid: 3.3.6 + picocolors: 1.0.0 + source-map-js: 1.0.2 + dev: true + + /rollup/3.28.0: + resolution: {integrity: sha512-d7zhvo1OUY2SXSM6pfNjgD5+d0Nz87CUp4mt8l/GgVP3oBsPwzNvSzyu1me6BSG9JIgWNTVcafIXBIyM8yQ3yw==} + engines: {node: '>=14.18.0', npm: '>=8.0.0'} + hasBin: true + optionalDependencies: + fsevents: 2.3.2 + dev: true + + /source-map-js/1.0.2: + resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} + engines: {node: '>=0.10.0'} + dev: true + + /typescript/5.1.6: + resolution: {integrity: sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==} + engines: {node: '>=14.17'} + hasBin: true + dev: true + + /vite/4.4.9: + resolution: {integrity: sha512-2mbUn2LlUmNASWwSCNSJ/EG2HuSRTnVNaydp6vMCm5VIqJsjMfbIWtbH2kDuwUVW5mMUKKZvGPX/rqeqVvv1XA==} + engines: {node: ^14.18.0 || >=16.0.0} + hasBin: true + peerDependencies: + '@types/node': '>= 14' + less: '*' + lightningcss: ^1.21.0 + sass: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + dependencies: + esbuild: 0.18.20 + postcss: 8.4.27 + rollup: 3.28.0 + optionalDependencies: + fsevents: 2.3.2 + dev: true diff --git a/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.solution/public/vite.svg b/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.solution/public/vite.svg new file mode 100644 index 0000000..e7b8dfb --- /dev/null +++ b/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.solution/public/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.solution/src/counter.ts b/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.solution/src/counter.ts new file mode 100644 index 0000000..09e5afd --- /dev/null +++ b/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.solution/src/counter.ts @@ -0,0 +1,9 @@ +export function setupCounter(element: HTMLButtonElement) { + let counter = 0 + const setCounter = (count: number) => { + counter = count + element.innerHTML = `count is ${counter}` + } + element.addEventListener('click', () => setCounter(counter + 1)) + setCounter(0) +} diff --git a/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.solution/src/main.ts b/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.solution/src/main.ts new file mode 100644 index 0000000..791547b --- /dev/null +++ b/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.solution/src/main.ts @@ -0,0 +1,24 @@ +import './style.css' +import typescriptLogo from './typescript.svg' +import viteLogo from '/vite.svg' +import { setupCounter } from './counter.ts' + +document.querySelector('#app')!.innerHTML = ` + + + + + + + + Vite + TypeScript + + + + + Click on the Vite and TypeScript logos to learn more + + +` + +setupCounter(document.querySelector('#counter')!) diff --git a/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.solution/src/style.css b/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.solution/src/style.css new file mode 100644 index 0000000..b528b6c --- /dev/null +++ b/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.solution/src/style.css @@ -0,0 +1,97 @@ +:root { + font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; + line-height: 1.5; + font-weight: 400; + + color-scheme: light dark; + color: rgba(255, 255, 255, 0.87); + background-color: #242424; + + font-synthesis: none; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + -webkit-text-size-adjust: 100%; +} + +a { + font-weight: 500; + color: #646cff; + text-decoration: inherit; +} +a:hover { + color: #535bf2; +} + +body { + margin: 0; + display: flex; + place-items: center; + min-width: 320px; + min-height: 100vh; +} + +h1 { + font-size: 3.2em; + line-height: 1.1; +} + +#app { + max-width: 1280px; + margin: 0 auto; + padding: 2rem; + text-align: center; +} + +.logo { + height: 6em; + padding: 1.5em; + will-change: filter; + transition: filter 300ms; +} +.logo:hover { + filter: drop-shadow(0 0 2em #646cffaa); +} +.logo.vanilla:hover { + filter: drop-shadow(0 0 2em #3178c6aa); +} + +.card { + padding: 2em; +} + +.read-the-docs { + color: #888; +} + +button { + border-radius: 8px; + border: 1px solid transparent; + padding: 0.6em 1.2em; + font-size: 1em; + font-weight: 500; + font-family: inherit; + background-color: #1a1a1a; + cursor: pointer; + transition: border-color 0.25s; +} +button:hover { + border-color: #646cff; +} +button:focus, +button:focus-visible { + outline: 4px auto -webkit-focus-ring-color; +} + +@media (prefers-color-scheme: light) { + :root { + color: #213547; + background-color: #ffffff; + } + a:hover { + color: #747bff; + } + button { + background-color: #f9f9f9; + } +} diff --git a/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.solution/src/typescript.svg b/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.solution/src/typescript.svg new file mode 100644 index 0000000..d91c910 --- /dev/null +++ b/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.solution/src/typescript.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.solution/src/vite-env.d.ts b/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.solution/src/vite-env.d.ts new file mode 100644 index 0000000..11f02fe --- /dev/null +++ b/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.solution/src/vite-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.solution/tsconfig.json b/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.solution/tsconfig.json new file mode 100644 index 0000000..75abdef --- /dev/null +++ b/src/010-typescript-in-the-build-process/015-typescript-as-a-linter.solution/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "module": "ESNext", + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src"] +} diff --git a/src/010-typescript-in-the-build-process/016-typescript-on-ci.explainer/.github/workflows/ci.yml b/src/010-typescript-in-the-build-process/016-typescript-on-ci.explainer/.github/workflows/ci.yml new file mode 100644 index 0000000..b268647 --- /dev/null +++ b/src/010-typescript-in-the-build-process/016-typescript-on-ci.explainer/.github/workflows/ci.yml @@ -0,0 +1,38 @@ +name: CI +on: + # Runs against all pushes + push: + branches: + - "**" + + # Runs against all pull requests + pull_request: + branches: + - "**" + +jobs: + ci: + # Runs on the latest version of Ubuntu, a linux distro + runs-on: ubuntu-latest + steps: + # Checks out the current branch using git checkout + - uses: actions/checkout@v3 + + # Sets up pnpm with version 7 + - uses: pnpm/action-setup@v2 + with: + version: 7 + + # Sets up node + - uses: actions/setup-node@v3 + with: + node-version: 16.x + # Sets up pnpm's cache + cache: "pnpm" + + # Install with frozen lockfile to ensure packages + # are not accidentally updated + - run: pnpm install --frozen-lockfile + + # Run the 'ci' script defined in package.json + - run: pnpm run ci diff --git a/src/010-typescript-in-the-build-process/016-typescript-on-ci.explainer/.gitignore b/src/010-typescript-in-the-build-process/016-typescript-on-ci.explainer/.gitignore new file mode 100644 index 0000000..a547bf3 --- /dev/null +++ b/src/010-typescript-in-the-build-process/016-typescript-on-ci.explainer/.gitignore @@ -0,0 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/src/010-typescript-in-the-build-process/016-typescript-on-ci.explainer/index.html b/src/010-typescript-in-the-build-process/016-typescript-on-ci.explainer/index.html new file mode 100644 index 0000000..f86e483 --- /dev/null +++ b/src/010-typescript-in-the-build-process/016-typescript-on-ci.explainer/index.html @@ -0,0 +1,13 @@ + + + + + + + Vite + TS + + + + + + diff --git a/src/010-typescript-in-the-build-process/016-typescript-on-ci.explainer/package.json b/src/010-typescript-in-the-build-process/016-typescript-on-ci.explainer/package.json new file mode 100644 index 0000000..0c4b2ec --- /dev/null +++ b/src/010-typescript-in-the-build-process/016-typescript-on-ci.explainer/package.json @@ -0,0 +1,16 @@ +{ + "name": "013-setting-up-a-frontend-app-with-vite.solution", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "ci": "tsc", + "dev": "vite", + "build": "tsc && vite build", + "preview": "vite preview" + }, + "devDependencies": { + "typescript": "^5.0.2", + "vite": "^4.4.5" + } +} diff --git a/src/010-typescript-in-the-build-process/016-typescript-on-ci.explainer/pnpm-lock.yaml b/src/010-typescript-in-the-build-process/016-typescript-on-ci.explainer/pnpm-lock.yaml new file mode 100644 index 0000000..9af6dfc --- /dev/null +++ b/src/010-typescript-in-the-build-process/016-typescript-on-ci.explainer/pnpm-lock.yaml @@ -0,0 +1,320 @@ +lockfileVersion: 5.4 + +specifiers: + typescript: ^5.0.2 + vite: ^4.4.5 + +devDependencies: + typescript: 5.1.6 + vite: 4.4.9 + +packages: + + /@esbuild/android-arm/0.18.20: + resolution: {integrity: sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-arm64/0.18.20: + resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-x64/0.18.20: + resolution: {integrity: sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-arm64/0.18.20: + resolution: {integrity: sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-x64/0.18.20: + resolution: {integrity: sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-arm64/0.18.20: + resolution: {integrity: sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-x64/0.18.20: + resolution: {integrity: sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm/0.18.20: + resolution: {integrity: sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm64/0.18.20: + resolution: {integrity: sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ia32/0.18.20: + resolution: {integrity: sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-loong64/0.18.20: + resolution: {integrity: sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-mips64el/0.18.20: + resolution: {integrity: sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ppc64/0.18.20: + resolution: {integrity: sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-riscv64/0.18.20: + resolution: {integrity: sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-s390x/0.18.20: + resolution: {integrity: sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-x64/0.18.20: + resolution: {integrity: sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/netbsd-x64/0.18.20: + resolution: {integrity: sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/openbsd-x64/0.18.20: + resolution: {integrity: sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/sunos-x64/0.18.20: + resolution: {integrity: sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-arm64/0.18.20: + resolution: {integrity: sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-ia32/0.18.20: + resolution: {integrity: sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-x64/0.18.20: + resolution: {integrity: sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /esbuild/0.18.20: + resolution: {integrity: sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@esbuild/android-arm': 0.18.20 + '@esbuild/android-arm64': 0.18.20 + '@esbuild/android-x64': 0.18.20 + '@esbuild/darwin-arm64': 0.18.20 + '@esbuild/darwin-x64': 0.18.20 + '@esbuild/freebsd-arm64': 0.18.20 + '@esbuild/freebsd-x64': 0.18.20 + '@esbuild/linux-arm': 0.18.20 + '@esbuild/linux-arm64': 0.18.20 + '@esbuild/linux-ia32': 0.18.20 + '@esbuild/linux-loong64': 0.18.20 + '@esbuild/linux-mips64el': 0.18.20 + '@esbuild/linux-ppc64': 0.18.20 + '@esbuild/linux-riscv64': 0.18.20 + '@esbuild/linux-s390x': 0.18.20 + '@esbuild/linux-x64': 0.18.20 + '@esbuild/netbsd-x64': 0.18.20 + '@esbuild/openbsd-x64': 0.18.20 + '@esbuild/sunos-x64': 0.18.20 + '@esbuild/win32-arm64': 0.18.20 + '@esbuild/win32-ia32': 0.18.20 + '@esbuild/win32-x64': 0.18.20 + dev: true + + /fsevents/2.3.2: + resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /nanoid/3.3.6: + resolution: {integrity: sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + dev: true + + /picocolors/1.0.0: + resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} + dev: true + + /postcss/8.4.27: + resolution: {integrity: sha512-gY/ACJtJPSmUFPDCHtX78+01fHa64FaU4zaaWfuh1MhGJISufJAH4cun6k/8fwsHYeK4UQmENQK+tRLCFJE8JQ==} + engines: {node: ^10 || ^12 || >=14} + dependencies: + nanoid: 3.3.6 + picocolors: 1.0.0 + source-map-js: 1.0.2 + dev: true + + /rollup/3.28.0: + resolution: {integrity: sha512-d7zhvo1OUY2SXSM6pfNjgD5+d0Nz87CUp4mt8l/GgVP3oBsPwzNvSzyu1me6BSG9JIgWNTVcafIXBIyM8yQ3yw==} + engines: {node: '>=14.18.0', npm: '>=8.0.0'} + hasBin: true + optionalDependencies: + fsevents: 2.3.2 + dev: true + + /source-map-js/1.0.2: + resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} + engines: {node: '>=0.10.0'} + dev: true + + /typescript/5.1.6: + resolution: {integrity: sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==} + engines: {node: '>=14.17'} + hasBin: true + dev: true + + /vite/4.4.9: + resolution: {integrity: sha512-2mbUn2LlUmNASWwSCNSJ/EG2HuSRTnVNaydp6vMCm5VIqJsjMfbIWtbH2kDuwUVW5mMUKKZvGPX/rqeqVvv1XA==} + engines: {node: ^14.18.0 || >=16.0.0} + hasBin: true + peerDependencies: + '@types/node': '>= 14' + less: '*' + lightningcss: ^1.21.0 + sass: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + dependencies: + esbuild: 0.18.20 + postcss: 8.4.27 + rollup: 3.28.0 + optionalDependencies: + fsevents: 2.3.2 + dev: true diff --git a/src/010-typescript-in-the-build-process/016-typescript-on-ci.explainer/public/vite.svg b/src/010-typescript-in-the-build-process/016-typescript-on-ci.explainer/public/vite.svg new file mode 100644 index 0000000..e7b8dfb --- /dev/null +++ b/src/010-typescript-in-the-build-process/016-typescript-on-ci.explainer/public/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/010-typescript-in-the-build-process/016-typescript-on-ci.explainer/src/counter.ts b/src/010-typescript-in-the-build-process/016-typescript-on-ci.explainer/src/counter.ts new file mode 100644 index 0000000..09e5afd --- /dev/null +++ b/src/010-typescript-in-the-build-process/016-typescript-on-ci.explainer/src/counter.ts @@ -0,0 +1,9 @@ +export function setupCounter(element: HTMLButtonElement) { + let counter = 0 + const setCounter = (count: number) => { + counter = count + element.innerHTML = `count is ${counter}` + } + element.addEventListener('click', () => setCounter(counter + 1)) + setCounter(0) +} diff --git a/src/010-typescript-in-the-build-process/016-typescript-on-ci.explainer/src/main.ts b/src/010-typescript-in-the-build-process/016-typescript-on-ci.explainer/src/main.ts new file mode 100644 index 0000000..791547b --- /dev/null +++ b/src/010-typescript-in-the-build-process/016-typescript-on-ci.explainer/src/main.ts @@ -0,0 +1,24 @@ +import './style.css' +import typescriptLogo from './typescript.svg' +import viteLogo from '/vite.svg' +import { setupCounter } from './counter.ts' + +document.querySelector('#app')!.innerHTML = ` + + + + + + + + Vite + TypeScript + + + + + Click on the Vite and TypeScript logos to learn more + + +` + +setupCounter(document.querySelector('#counter')!) diff --git a/src/010-typescript-in-the-build-process/016-typescript-on-ci.explainer/src/style.css b/src/010-typescript-in-the-build-process/016-typescript-on-ci.explainer/src/style.css new file mode 100644 index 0000000..b528b6c --- /dev/null +++ b/src/010-typescript-in-the-build-process/016-typescript-on-ci.explainer/src/style.css @@ -0,0 +1,97 @@ +:root { + font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; + line-height: 1.5; + font-weight: 400; + + color-scheme: light dark; + color: rgba(255, 255, 255, 0.87); + background-color: #242424; + + font-synthesis: none; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + -webkit-text-size-adjust: 100%; +} + +a { + font-weight: 500; + color: #646cff; + text-decoration: inherit; +} +a:hover { + color: #535bf2; +} + +body { + margin: 0; + display: flex; + place-items: center; + min-width: 320px; + min-height: 100vh; +} + +h1 { + font-size: 3.2em; + line-height: 1.1; +} + +#app { + max-width: 1280px; + margin: 0 auto; + padding: 2rem; + text-align: center; +} + +.logo { + height: 6em; + padding: 1.5em; + will-change: filter; + transition: filter 300ms; +} +.logo:hover { + filter: drop-shadow(0 0 2em #646cffaa); +} +.logo.vanilla:hover { + filter: drop-shadow(0 0 2em #3178c6aa); +} + +.card { + padding: 2em; +} + +.read-the-docs { + color: #888; +} + +button { + border-radius: 8px; + border: 1px solid transparent; + padding: 0.6em 1.2em; + font-size: 1em; + font-weight: 500; + font-family: inherit; + background-color: #1a1a1a; + cursor: pointer; + transition: border-color 0.25s; +} +button:hover { + border-color: #646cff; +} +button:focus, +button:focus-visible { + outline: 4px auto -webkit-focus-ring-color; +} + +@media (prefers-color-scheme: light) { + :root { + color: #213547; + background-color: #ffffff; + } + a:hover { + color: #747bff; + } + button { + background-color: #f9f9f9; + } +} diff --git a/src/010-typescript-in-the-build-process/016-typescript-on-ci.explainer/src/typescript.svg b/src/010-typescript-in-the-build-process/016-typescript-on-ci.explainer/src/typescript.svg new file mode 100644 index 0000000..d91c910 --- /dev/null +++ b/src/010-typescript-in-the-build-process/016-typescript-on-ci.explainer/src/typescript.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/010-typescript-in-the-build-process/016-typescript-on-ci.explainer/src/vite-env.d.ts b/src/010-typescript-in-the-build-process/016-typescript-on-ci.explainer/src/vite-env.d.ts new file mode 100644 index 0000000..11f02fe --- /dev/null +++ b/src/010-typescript-in-the-build-process/016-typescript-on-ci.explainer/src/vite-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/src/010-typescript-in-the-build-process/016-typescript-on-ci.explainer/tsconfig.json b/src/010-typescript-in-the-build-process/016-typescript-on-ci.explainer/tsconfig.json new file mode 100644 index 0000000..75abdef --- /dev/null +++ b/src/010-typescript-in-the-build-process/016-typescript-on-ci.explainer/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "module": "ESNext", + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src"] +} diff --git a/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.problem/.gitignore b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.problem/.gitignore new file mode 100644 index 0000000..a547bf3 --- /dev/null +++ b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.problem/.gitignore @@ -0,0 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.problem/index.html b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.problem/index.html new file mode 100644 index 0000000..f86e483 --- /dev/null +++ b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.problem/index.html @@ -0,0 +1,13 @@ + + + + + + + Vite + TS + + + + + + diff --git a/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.problem/package.json b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.problem/package.json new file mode 100644 index 0000000..0c4b2ec --- /dev/null +++ b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.problem/package.json @@ -0,0 +1,16 @@ +{ + "name": "013-setting-up-a-frontend-app-with-vite.solution", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "ci": "tsc", + "dev": "vite", + "build": "tsc && vite build", + "preview": "vite preview" + }, + "devDependencies": { + "typescript": "^5.0.2", + "vite": "^4.4.5" + } +} diff --git a/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.problem/pnpm-lock.yaml b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.problem/pnpm-lock.yaml new file mode 100644 index 0000000..9af6dfc --- /dev/null +++ b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.problem/pnpm-lock.yaml @@ -0,0 +1,320 @@ +lockfileVersion: 5.4 + +specifiers: + typescript: ^5.0.2 + vite: ^4.4.5 + +devDependencies: + typescript: 5.1.6 + vite: 4.4.9 + +packages: + + /@esbuild/android-arm/0.18.20: + resolution: {integrity: sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-arm64/0.18.20: + resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-x64/0.18.20: + resolution: {integrity: sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-arm64/0.18.20: + resolution: {integrity: sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-x64/0.18.20: + resolution: {integrity: sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-arm64/0.18.20: + resolution: {integrity: sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-x64/0.18.20: + resolution: {integrity: sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm/0.18.20: + resolution: {integrity: sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm64/0.18.20: + resolution: {integrity: sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ia32/0.18.20: + resolution: {integrity: sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-loong64/0.18.20: + resolution: {integrity: sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-mips64el/0.18.20: + resolution: {integrity: sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ppc64/0.18.20: + resolution: {integrity: sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-riscv64/0.18.20: + resolution: {integrity: sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-s390x/0.18.20: + resolution: {integrity: sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-x64/0.18.20: + resolution: {integrity: sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/netbsd-x64/0.18.20: + resolution: {integrity: sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/openbsd-x64/0.18.20: + resolution: {integrity: sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/sunos-x64/0.18.20: + resolution: {integrity: sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-arm64/0.18.20: + resolution: {integrity: sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-ia32/0.18.20: + resolution: {integrity: sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-x64/0.18.20: + resolution: {integrity: sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /esbuild/0.18.20: + resolution: {integrity: sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@esbuild/android-arm': 0.18.20 + '@esbuild/android-arm64': 0.18.20 + '@esbuild/android-x64': 0.18.20 + '@esbuild/darwin-arm64': 0.18.20 + '@esbuild/darwin-x64': 0.18.20 + '@esbuild/freebsd-arm64': 0.18.20 + '@esbuild/freebsd-x64': 0.18.20 + '@esbuild/linux-arm': 0.18.20 + '@esbuild/linux-arm64': 0.18.20 + '@esbuild/linux-ia32': 0.18.20 + '@esbuild/linux-loong64': 0.18.20 + '@esbuild/linux-mips64el': 0.18.20 + '@esbuild/linux-ppc64': 0.18.20 + '@esbuild/linux-riscv64': 0.18.20 + '@esbuild/linux-s390x': 0.18.20 + '@esbuild/linux-x64': 0.18.20 + '@esbuild/netbsd-x64': 0.18.20 + '@esbuild/openbsd-x64': 0.18.20 + '@esbuild/sunos-x64': 0.18.20 + '@esbuild/win32-arm64': 0.18.20 + '@esbuild/win32-ia32': 0.18.20 + '@esbuild/win32-x64': 0.18.20 + dev: true + + /fsevents/2.3.2: + resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /nanoid/3.3.6: + resolution: {integrity: sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + dev: true + + /picocolors/1.0.0: + resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} + dev: true + + /postcss/8.4.27: + resolution: {integrity: sha512-gY/ACJtJPSmUFPDCHtX78+01fHa64FaU4zaaWfuh1MhGJISufJAH4cun6k/8fwsHYeK4UQmENQK+tRLCFJE8JQ==} + engines: {node: ^10 || ^12 || >=14} + dependencies: + nanoid: 3.3.6 + picocolors: 1.0.0 + source-map-js: 1.0.2 + dev: true + + /rollup/3.28.0: + resolution: {integrity: sha512-d7zhvo1OUY2SXSM6pfNjgD5+d0Nz87CUp4mt8l/GgVP3oBsPwzNvSzyu1me6BSG9JIgWNTVcafIXBIyM8yQ3yw==} + engines: {node: '>=14.18.0', npm: '>=8.0.0'} + hasBin: true + optionalDependencies: + fsevents: 2.3.2 + dev: true + + /source-map-js/1.0.2: + resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} + engines: {node: '>=0.10.0'} + dev: true + + /typescript/5.1.6: + resolution: {integrity: sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==} + engines: {node: '>=14.17'} + hasBin: true + dev: true + + /vite/4.4.9: + resolution: {integrity: sha512-2mbUn2LlUmNASWwSCNSJ/EG2HuSRTnVNaydp6vMCm5VIqJsjMfbIWtbH2kDuwUVW5mMUKKZvGPX/rqeqVvv1XA==} + engines: {node: ^14.18.0 || >=16.0.0} + hasBin: true + peerDependencies: + '@types/node': '>= 14' + less: '*' + lightningcss: ^1.21.0 + sass: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + dependencies: + esbuild: 0.18.20 + postcss: 8.4.27 + rollup: 3.28.0 + optionalDependencies: + fsevents: 2.3.2 + dev: true diff --git a/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.problem/public/vite.svg b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.problem/public/vite.svg new file mode 100644 index 0000000..e7b8dfb --- /dev/null +++ b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.problem/public/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.problem/src/counter.ts b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.problem/src/counter.ts new file mode 100644 index 0000000..09e5afd --- /dev/null +++ b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.problem/src/counter.ts @@ -0,0 +1,9 @@ +export function setupCounter(element: HTMLButtonElement) { + let counter = 0 + const setCounter = (count: number) => { + counter = count + element.innerHTML = `count is ${counter}` + } + element.addEventListener('click', () => setCounter(counter + 1)) + setCounter(0) +} diff --git a/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.problem/src/main.ts b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.problem/src/main.ts new file mode 100644 index 0000000..791547b --- /dev/null +++ b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.problem/src/main.ts @@ -0,0 +1,24 @@ +import './style.css' +import typescriptLogo from './typescript.svg' +import viteLogo from '/vite.svg' +import { setupCounter } from './counter.ts' + +document.querySelector('#app')!.innerHTML = ` + + + + + + + + Vite + TypeScript + + + + + Click on the Vite and TypeScript logos to learn more + + +` + +setupCounter(document.querySelector('#counter')!) diff --git a/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.problem/src/style.css b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.problem/src/style.css new file mode 100644 index 0000000..b528b6c --- /dev/null +++ b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.problem/src/style.css @@ -0,0 +1,97 @@ +:root { + font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; + line-height: 1.5; + font-weight: 400; + + color-scheme: light dark; + color: rgba(255, 255, 255, 0.87); + background-color: #242424; + + font-synthesis: none; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + -webkit-text-size-adjust: 100%; +} + +a { + font-weight: 500; + color: #646cff; + text-decoration: inherit; +} +a:hover { + color: #535bf2; +} + +body { + margin: 0; + display: flex; + place-items: center; + min-width: 320px; + min-height: 100vh; +} + +h1 { + font-size: 3.2em; + line-height: 1.1; +} + +#app { + max-width: 1280px; + margin: 0 auto; + padding: 2rem; + text-align: center; +} + +.logo { + height: 6em; + padding: 1.5em; + will-change: filter; + transition: filter 300ms; +} +.logo:hover { + filter: drop-shadow(0 0 2em #646cffaa); +} +.logo.vanilla:hover { + filter: drop-shadow(0 0 2em #3178c6aa); +} + +.card { + padding: 2em; +} + +.read-the-docs { + color: #888; +} + +button { + border-radius: 8px; + border: 1px solid transparent; + padding: 0.6em 1.2em; + font-size: 1em; + font-weight: 500; + font-family: inherit; + background-color: #1a1a1a; + cursor: pointer; + transition: border-color 0.25s; +} +button:hover { + border-color: #646cff; +} +button:focus, +button:focus-visible { + outline: 4px auto -webkit-focus-ring-color; +} + +@media (prefers-color-scheme: light) { + :root { + color: #213547; + background-color: #ffffff; + } + a:hover { + color: #747bff; + } + button { + background-color: #f9f9f9; + } +} diff --git a/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.problem/src/typescript.svg b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.problem/src/typescript.svg new file mode 100644 index 0000000..d91c910 --- /dev/null +++ b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.problem/src/typescript.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.problem/src/vite-env.d.ts b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.problem/src/vite-env.d.ts new file mode 100644 index 0000000..11f02fe --- /dev/null +++ b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.problem/src/vite-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.problem/tsconfig.json b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.problem/tsconfig.json new file mode 100644 index 0000000..75abdef --- /dev/null +++ b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.problem/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "module": "ESNext", + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src"] +} diff --git a/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.1/.gitignore b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.1/.gitignore new file mode 100644 index 0000000..a547bf3 --- /dev/null +++ b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.1/.gitignore @@ -0,0 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.1/index.html b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.1/index.html new file mode 100644 index 0000000..f86e483 --- /dev/null +++ b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.1/index.html @@ -0,0 +1,13 @@ + + + + + + + Vite + TS + + + + + + diff --git a/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.1/package.json b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.1/package.json new file mode 100644 index 0000000..4fd9184 --- /dev/null +++ b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.1/package.json @@ -0,0 +1,17 @@ +{ + "name": "013-setting-up-a-frontend-app-with-vite.solution", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "ci": "tsc", + "dev": "vite", + "build": "tsc && vite build", + "preview": "vite preview" + }, + "devDependencies": { + "typescript": "^5.0.2", + "vite": "^4.4.5", + "vite-plugin-checker": "^0.6.1" + } +} diff --git a/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.1/pnpm-lock.yaml b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.1/pnpm-lock.yaml new file mode 100644 index 0000000..26be38e --- /dev/null +++ b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.1/pnpm-lock.yaml @@ -0,0 +1,803 @@ +lockfileVersion: 5.4 + +specifiers: + typescript: ^5.0.2 + vite: ^4.4.5 + vite-plugin-checker: ^0.6.1 + +devDependencies: + typescript: 5.1.6 + vite: 4.4.9 + vite-plugin-checker: 0.6.1_vxtpzrd3ijvkhh2fvnu2mlkwnm + +packages: + + /@babel/code-frame/7.22.10: + resolution: {integrity: sha512-/KKIMG4UEL35WmI9OlvMhurwtytjvXoFcGNrOvyG9zIzA8YmPjVtIZUf7b05+TPO7G7/GEmLHDaoCgACHl9hhA==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/highlight': 7.22.10 + chalk: 2.4.2 + dev: true + + /@babel/helper-validator-identifier/7.22.5: + resolution: {integrity: sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==} + engines: {node: '>=6.9.0'} + dev: true + + /@babel/highlight/7.22.10: + resolution: {integrity: sha512-78aUtVcT7MUscr0K5mIEnkwxPE0MaxkR5RxRwuHaQ+JuU5AmTPhY+do2mdzVTnIJJpyBglql2pehuBIWHug+WQ==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-validator-identifier': 7.22.5 + chalk: 2.4.2 + js-tokens: 4.0.0 + dev: true + + /@esbuild/android-arm/0.18.20: + resolution: {integrity: sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-arm64/0.18.20: + resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-x64/0.18.20: + resolution: {integrity: sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-arm64/0.18.20: + resolution: {integrity: sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-x64/0.18.20: + resolution: {integrity: sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-arm64/0.18.20: + resolution: {integrity: sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-x64/0.18.20: + resolution: {integrity: sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm/0.18.20: + resolution: {integrity: sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm64/0.18.20: + resolution: {integrity: sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ia32/0.18.20: + resolution: {integrity: sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-loong64/0.18.20: + resolution: {integrity: sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-mips64el/0.18.20: + resolution: {integrity: sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ppc64/0.18.20: + resolution: {integrity: sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-riscv64/0.18.20: + resolution: {integrity: sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-s390x/0.18.20: + resolution: {integrity: sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-x64/0.18.20: + resolution: {integrity: sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/netbsd-x64/0.18.20: + resolution: {integrity: sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/openbsd-x64/0.18.20: + resolution: {integrity: sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/sunos-x64/0.18.20: + resolution: {integrity: sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-arm64/0.18.20: + resolution: {integrity: sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-ia32/0.18.20: + resolution: {integrity: sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-x64/0.18.20: + resolution: {integrity: sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@nodelib/fs.scandir/2.1.5: + resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} + engines: {node: '>= 8'} + dependencies: + '@nodelib/fs.stat': 2.0.5 + run-parallel: 1.2.0 + dev: true + + /@nodelib/fs.stat/2.0.5: + resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} + engines: {node: '>= 8'} + dev: true + + /@nodelib/fs.walk/1.2.8: + resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} + engines: {node: '>= 8'} + dependencies: + '@nodelib/fs.scandir': 2.1.5 + fastq: 1.15.0 + dev: true + + /ansi-escapes/4.3.2: + resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} + engines: {node: '>=8'} + dependencies: + type-fest: 0.21.3 + dev: true + + /ansi-regex/5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + dev: true + + /ansi-styles/3.2.1: + resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} + engines: {node: '>=4'} + dependencies: + color-convert: 1.9.3 + dev: true + + /ansi-styles/4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + dependencies: + color-convert: 2.0.1 + dev: true + + /anymatch/3.1.3: + resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} + engines: {node: '>= 8'} + dependencies: + normalize-path: 3.0.0 + picomatch: 2.3.1 + dev: true + + /balanced-match/1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + dev: true + + /binary-extensions/2.2.0: + resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} + engines: {node: '>=8'} + dev: true + + /brace-expansion/1.1.11: + resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} + dependencies: + balanced-match: 1.0.2 + concat-map: 0.0.1 + dev: true + + /braces/3.0.2: + resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} + engines: {node: '>=8'} + dependencies: + fill-range: 7.0.1 + dev: true + + /chalk/2.4.2: + resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} + engines: {node: '>=4'} + dependencies: + ansi-styles: 3.2.1 + escape-string-regexp: 1.0.5 + supports-color: 5.5.0 + dev: true + + /chalk/4.1.2: + resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} + engines: {node: '>=10'} + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + dev: true + + /chokidar/3.5.3: + resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==} + engines: {node: '>= 8.10.0'} + dependencies: + anymatch: 3.1.3 + braces: 3.0.2 + glob-parent: 5.1.2 + is-binary-path: 2.1.0 + is-glob: 4.0.3 + normalize-path: 3.0.0 + readdirp: 3.6.0 + optionalDependencies: + fsevents: 2.3.2 + dev: true + + /color-convert/1.9.3: + resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} + dependencies: + color-name: 1.1.3 + dev: true + + /color-convert/2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + dependencies: + color-name: 1.1.4 + dev: true + + /color-name/1.1.3: + resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} + dev: true + + /color-name/1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + dev: true + + /commander/8.3.0: + resolution: {integrity: sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==} + engines: {node: '>= 12'} + dev: true + + /concat-map/0.0.1: + resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=} + dev: true + + /esbuild/0.18.20: + resolution: {integrity: sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@esbuild/android-arm': 0.18.20 + '@esbuild/android-arm64': 0.18.20 + '@esbuild/android-x64': 0.18.20 + '@esbuild/darwin-arm64': 0.18.20 + '@esbuild/darwin-x64': 0.18.20 + '@esbuild/freebsd-arm64': 0.18.20 + '@esbuild/freebsd-x64': 0.18.20 + '@esbuild/linux-arm': 0.18.20 + '@esbuild/linux-arm64': 0.18.20 + '@esbuild/linux-ia32': 0.18.20 + '@esbuild/linux-loong64': 0.18.20 + '@esbuild/linux-mips64el': 0.18.20 + '@esbuild/linux-ppc64': 0.18.20 + '@esbuild/linux-riscv64': 0.18.20 + '@esbuild/linux-s390x': 0.18.20 + '@esbuild/linux-x64': 0.18.20 + '@esbuild/netbsd-x64': 0.18.20 + '@esbuild/openbsd-x64': 0.18.20 + '@esbuild/sunos-x64': 0.18.20 + '@esbuild/win32-arm64': 0.18.20 + '@esbuild/win32-ia32': 0.18.20 + '@esbuild/win32-x64': 0.18.20 + dev: true + + /escape-string-regexp/1.0.5: + resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} + engines: {node: '>=0.8.0'} + dev: true + + /fast-glob/3.3.1: + resolution: {integrity: sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==} + engines: {node: '>=8.6.0'} + dependencies: + '@nodelib/fs.stat': 2.0.5 + '@nodelib/fs.walk': 1.2.8 + glob-parent: 5.1.2 + merge2: 1.4.1 + micromatch: 4.0.5 + dev: true + + /fastq/1.15.0: + resolution: {integrity: sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==} + dependencies: + reusify: 1.0.4 + dev: true + + /fill-range/7.0.1: + resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} + engines: {node: '>=8'} + dependencies: + to-regex-range: 5.0.1 + dev: true + + /fs-extra/11.1.1: + resolution: {integrity: sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==} + engines: {node: '>=14.14'} + dependencies: + graceful-fs: 4.2.11 + jsonfile: 6.1.0 + universalify: 2.0.0 + dev: true + + /fsevents/2.3.2: + resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /glob-parent/5.1.2: + resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} + engines: {node: '>= 6'} + dependencies: + is-glob: 4.0.3 + dev: true + + /graceful-fs/4.2.11: + resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + dev: true + + /has-flag/3.0.0: + resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} + engines: {node: '>=4'} + dev: true + + /has-flag/4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} + dev: true + + /is-binary-path/2.1.0: + resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} + engines: {node: '>=8'} + dependencies: + binary-extensions: 2.2.0 + dev: true + + /is-extglob/2.1.1: + resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} + engines: {node: '>=0.10.0'} + dev: true + + /is-glob/4.0.3: + resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} + engines: {node: '>=0.10.0'} + dependencies: + is-extglob: 2.1.1 + dev: true + + /is-number/7.0.0: + resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} + engines: {node: '>=0.12.0'} + dev: true + + /js-tokens/4.0.0: + resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + dev: true + + /jsonfile/6.1.0: + resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} + dependencies: + universalify: 2.0.0 + optionalDependencies: + graceful-fs: 4.2.11 + dev: true + + /lodash.debounce/4.0.8: + resolution: {integrity: sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==} + dev: true + + /lodash.pick/4.4.0: + resolution: {integrity: sha512-hXt6Ul/5yWjfklSGvLQl8vM//l3FtyHZeuelpzK6mm99pNvN9yTDruNZPEJZD1oWrqo+izBmB7oUfWgcCX7s4Q==} + dev: true + + /lru-cache/6.0.0: + resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} + engines: {node: '>=10'} + dependencies: + yallist: 4.0.0 + dev: true + + /merge2/1.4.1: + resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} + engines: {node: '>= 8'} + dev: true + + /micromatch/4.0.5: + resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} + engines: {node: '>=8.6'} + dependencies: + braces: 3.0.2 + picomatch: 2.3.1 + dev: true + + /minimatch/3.1.2: + resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + dependencies: + brace-expansion: 1.1.11 + dev: true + + /nanoid/3.3.6: + resolution: {integrity: sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + dev: true + + /normalize-path/3.0.0: + resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} + engines: {node: '>=0.10.0'} + dev: true + + /npm-run-path/4.0.1: + resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} + engines: {node: '>=8'} + dependencies: + path-key: 3.1.1 + dev: true + + /path-key/3.1.1: + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} + dev: true + + /picocolors/1.0.0: + resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} + dev: true + + /picomatch/2.3.1: + resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} + engines: {node: '>=8.6'} + dev: true + + /postcss/8.4.27: + resolution: {integrity: sha512-gY/ACJtJPSmUFPDCHtX78+01fHa64FaU4zaaWfuh1MhGJISufJAH4cun6k/8fwsHYeK4UQmENQK+tRLCFJE8JQ==} + engines: {node: ^10 || ^12 || >=14} + dependencies: + nanoid: 3.3.6 + picocolors: 1.0.0 + source-map-js: 1.0.2 + dev: true + + /queue-microtask/1.2.3: + resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} + dev: true + + /readdirp/3.6.0: + resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} + engines: {node: '>=8.10.0'} + dependencies: + picomatch: 2.3.1 + dev: true + + /reusify/1.0.4: + resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} + engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + dev: true + + /rollup/3.28.0: + resolution: {integrity: sha512-d7zhvo1OUY2SXSM6pfNjgD5+d0Nz87CUp4mt8l/GgVP3oBsPwzNvSzyu1me6BSG9JIgWNTVcafIXBIyM8yQ3yw==} + engines: {node: '>=14.18.0', npm: '>=8.0.0'} + hasBin: true + optionalDependencies: + fsevents: 2.3.2 + dev: true + + /run-parallel/1.2.0: + resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} + dependencies: + queue-microtask: 1.2.3 + dev: true + + /semver/7.5.4: + resolution: {integrity: sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==} + engines: {node: '>=10'} + hasBin: true + dependencies: + lru-cache: 6.0.0 + dev: true + + /source-map-js/1.0.2: + resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} + engines: {node: '>=0.10.0'} + dev: true + + /strip-ansi/6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} + dependencies: + ansi-regex: 5.0.1 + dev: true + + /supports-color/5.5.0: + resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} + engines: {node: '>=4'} + dependencies: + has-flag: 3.0.0 + dev: true + + /supports-color/7.2.0: + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} + dependencies: + has-flag: 4.0.0 + dev: true + + /tiny-invariant/1.3.1: + resolution: {integrity: sha512-AD5ih2NlSssTCwsMznbvwMZpJ1cbhkGd2uueNxzv2jDlEeZdU04JQfRnggJQ8DrcVBGjAsCKwFBbDlVNtEMlzw==} + dev: true + + /to-regex-range/5.0.1: + resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} + engines: {node: '>=8.0'} + dependencies: + is-number: 7.0.0 + dev: true + + /type-fest/0.21.3: + resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} + engines: {node: '>=10'} + dev: true + + /typescript/5.1.6: + resolution: {integrity: sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==} + engines: {node: '>=14.17'} + hasBin: true + dev: true + + /universalify/2.0.0: + resolution: {integrity: sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==} + engines: {node: '>= 10.0.0'} + dev: true + + /vite-plugin-checker/0.6.1_vxtpzrd3ijvkhh2fvnu2mlkwnm: + resolution: {integrity: sha512-4fAiu3W/IwRJuJkkUZlWbLunSzsvijDf0eDN6g/MGh6BUK4SMclOTGbLJCPvdAcMOQvVmm8JyJeYLYd4//8CkA==} + engines: {node: '>=14.16'} + peerDependencies: + eslint: '>=7' + meow: ^9.0.0 + optionator: ^0.9.1 + stylelint: '>=13' + typescript: '*' + vite: '>=2.0.0' + vls: '*' + vti: '*' + vue-tsc: '>=1.3.9' + peerDependenciesMeta: + eslint: + optional: true + meow: + optional: true + optionator: + optional: true + stylelint: + optional: true + typescript: + optional: true + vls: + optional: true + vti: + optional: true + vue-tsc: + optional: true + dependencies: + '@babel/code-frame': 7.22.10 + ansi-escapes: 4.3.2 + chalk: 4.1.2 + chokidar: 3.5.3 + commander: 8.3.0 + fast-glob: 3.3.1 + fs-extra: 11.1.1 + lodash.debounce: 4.0.8 + lodash.pick: 4.4.0 + npm-run-path: 4.0.1 + semver: 7.5.4 + strip-ansi: 6.0.1 + tiny-invariant: 1.3.1 + typescript: 5.1.6 + vite: 4.4.9 + vscode-languageclient: 7.0.0 + vscode-languageserver: 7.0.0 + vscode-languageserver-textdocument: 1.0.8 + vscode-uri: 3.0.7 + dev: true + + /vite/4.4.9: + resolution: {integrity: sha512-2mbUn2LlUmNASWwSCNSJ/EG2HuSRTnVNaydp6vMCm5VIqJsjMfbIWtbH2kDuwUVW5mMUKKZvGPX/rqeqVvv1XA==} + engines: {node: ^14.18.0 || >=16.0.0} + hasBin: true + peerDependencies: + '@types/node': '>= 14' + less: '*' + lightningcss: ^1.21.0 + sass: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + dependencies: + esbuild: 0.18.20 + postcss: 8.4.27 + rollup: 3.28.0 + optionalDependencies: + fsevents: 2.3.2 + dev: true + + /vscode-jsonrpc/6.0.0: + resolution: {integrity: sha512-wnJA4BnEjOSyFMvjZdpiOwhSq9uDoK8e/kpRJDTaMYzwlkrhG1fwDIZI94CLsLzlCK5cIbMMtFlJlfR57Lavmg==} + engines: {node: '>=8.0.0 || >=10.0.0'} + dev: true + + /vscode-languageclient/7.0.0: + resolution: {integrity: sha512-P9AXdAPlsCgslpP9pRxYPqkNYV7Xq8300/aZDpO35j1fJm/ncize8iGswzYlcvFw5DQUx4eVk+KvfXdL0rehNg==} + engines: {vscode: ^1.52.0} + dependencies: + minimatch: 3.1.2 + semver: 7.5.4 + vscode-languageserver-protocol: 3.16.0 + dev: true + + /vscode-languageserver-protocol/3.16.0: + resolution: {integrity: sha512-sdeUoAawceQdgIfTI+sdcwkiK2KU+2cbEYA0agzM2uqaUy2UpnnGHtWTHVEtS0ES4zHU0eMFRGN+oQgDxlD66A==} + dependencies: + vscode-jsonrpc: 6.0.0 + vscode-languageserver-types: 3.16.0 + dev: true + + /vscode-languageserver-textdocument/1.0.8: + resolution: {integrity: sha512-1bonkGqQs5/fxGT5UchTgjGVnfysL0O8v1AYMBjqTbWQTFn721zaPGDYFkOKtfDgFiSgXM3KwaG3FMGfW4Ed9Q==} + dev: true + + /vscode-languageserver-types/3.16.0: + resolution: {integrity: sha512-k8luDIWJWyenLc5ToFQQMaSrqCHiLwyKPHKPQZ5zz21vM+vIVUSvsRpcbiECH4WR88K2XZqc4ScRcZ7nk/jbeA==} + dev: true + + /vscode-languageserver/7.0.0: + resolution: {integrity: sha512-60HTx5ID+fLRcgdHfmz0LDZAXYEV68fzwG0JWwEPBode9NuMYTIxuYXPg4ngO8i8+Ou0lM7y6GzaYWbiDL0drw==} + hasBin: true + dependencies: + vscode-languageserver-protocol: 3.16.0 + dev: true + + /vscode-uri/3.0.7: + resolution: {integrity: sha512-eOpPHogvorZRobNqJGhapa0JdwaxpjVvyBp0QIUMRMSf8ZAlqOdEquKuRmw9Qwu0qXtJIWqFtMkmvJjUZmMjVA==} + dev: true + + /yallist/4.0.0: + resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} + dev: true diff --git a/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.1/public/vite.svg b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.1/public/vite.svg new file mode 100644 index 0000000..e7b8dfb --- /dev/null +++ b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.1/public/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.1/src/counter.ts b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.1/src/counter.ts new file mode 100644 index 0000000..09e5afd --- /dev/null +++ b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.1/src/counter.ts @@ -0,0 +1,9 @@ +export function setupCounter(element: HTMLButtonElement) { + let counter = 0 + const setCounter = (count: number) => { + counter = count + element.innerHTML = `count is ${counter}` + } + element.addEventListener('click', () => setCounter(counter + 1)) + setCounter(0) +} diff --git a/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.1/src/main.ts b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.1/src/main.ts new file mode 100644 index 0000000..5c558cd --- /dev/null +++ b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.1/src/main.ts @@ -0,0 +1,26 @@ +import "./style.css"; +import typescriptLogo from "./typescript.svg"; +import viteLogo from "/vite.svg"; +import { setupCounter } from "./counter"; + +document.querySelector("#app")!.innerHTML = ` + + + + + + + + Vite + TypeScript + + + + + Click on the Vite and TypeScript logos to learn more + + +`; + +let num: string = 123; + +setupCounter(document.querySelector("#counter")!); diff --git a/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.1/src/style.css b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.1/src/style.css new file mode 100644 index 0000000..b528b6c --- /dev/null +++ b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.1/src/style.css @@ -0,0 +1,97 @@ +:root { + font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; + line-height: 1.5; + font-weight: 400; + + color-scheme: light dark; + color: rgba(255, 255, 255, 0.87); + background-color: #242424; + + font-synthesis: none; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + -webkit-text-size-adjust: 100%; +} + +a { + font-weight: 500; + color: #646cff; + text-decoration: inherit; +} +a:hover { + color: #535bf2; +} + +body { + margin: 0; + display: flex; + place-items: center; + min-width: 320px; + min-height: 100vh; +} + +h1 { + font-size: 3.2em; + line-height: 1.1; +} + +#app { + max-width: 1280px; + margin: 0 auto; + padding: 2rem; + text-align: center; +} + +.logo { + height: 6em; + padding: 1.5em; + will-change: filter; + transition: filter 300ms; +} +.logo:hover { + filter: drop-shadow(0 0 2em #646cffaa); +} +.logo.vanilla:hover { + filter: drop-shadow(0 0 2em #3178c6aa); +} + +.card { + padding: 2em; +} + +.read-the-docs { + color: #888; +} + +button { + border-radius: 8px; + border: 1px solid transparent; + padding: 0.6em 1.2em; + font-size: 1em; + font-weight: 500; + font-family: inherit; + background-color: #1a1a1a; + cursor: pointer; + transition: border-color 0.25s; +} +button:hover { + border-color: #646cff; +} +button:focus, +button:focus-visible { + outline: 4px auto -webkit-focus-ring-color; +} + +@media (prefers-color-scheme: light) { + :root { + color: #213547; + background-color: #ffffff; + } + a:hover { + color: #747bff; + } + button { + background-color: #f9f9f9; + } +} diff --git a/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.1/src/typescript.svg b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.1/src/typescript.svg new file mode 100644 index 0000000..d91c910 --- /dev/null +++ b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.1/src/typescript.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.1/src/vite-env.d.ts b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.1/src/vite-env.d.ts new file mode 100644 index 0000000..11f02fe --- /dev/null +++ b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.1/src/vite-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.1/tsconfig.json b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.1/tsconfig.json new file mode 100644 index 0000000..75abdef --- /dev/null +++ b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.1/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "module": "ESNext", + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src"] +} diff --git a/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.1/vite.config.js b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.1/vite.config.js new file mode 100644 index 0000000..a7a1c70 --- /dev/null +++ b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.1/vite.config.js @@ -0,0 +1,9 @@ +import checker from "vite-plugin-checker"; + +export default { + plugins: [ + checker({ + typescript: true, + }), + ], +}; diff --git a/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.2/.gitignore b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.2/.gitignore new file mode 100644 index 0000000..a547bf3 --- /dev/null +++ b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.2/.gitignore @@ -0,0 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.2/index.html b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.2/index.html new file mode 100644 index 0000000..f86e483 --- /dev/null +++ b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.2/index.html @@ -0,0 +1,13 @@ + + + + + + + Vite + TS + + + + + + diff --git a/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.2/package.json b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.2/package.json new file mode 100644 index 0000000..78ebb22 --- /dev/null +++ b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.2/package.json @@ -0,0 +1,19 @@ +{ + "name": "013-setting-up-a-frontend-app-with-vite.solution", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "ci": "tsc", + "dev": "run-p dev:*", + "dev:vite": "vite", + "dev:tsc": "tsc --watch", + "build": "tsc && vite build", + "preview": "vite preview" + }, + "devDependencies": { + "typescript": "^5.0.2", + "vite": "^4.4.5", + "npm-run-all": "^4.1.5" + } +} diff --git a/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.2/pnpm-lock.yaml b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.2/pnpm-lock.yaml new file mode 100644 index 0000000..4902449 --- /dev/null +++ b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.2/pnpm-lock.yaml @@ -0,0 +1,1039 @@ +lockfileVersion: 5.4 + +specifiers: + npm-run-all: ^4.1.5 + typescript: ^5.0.2 + vite: ^4.4.5 + +devDependencies: + npm-run-all: 4.1.5 + typescript: 5.1.6 + vite: 4.4.9 + +packages: + + /@esbuild/android-arm/0.18.20: + resolution: {integrity: sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-arm64/0.18.20: + resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-x64/0.18.20: + resolution: {integrity: sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-arm64/0.18.20: + resolution: {integrity: sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-x64/0.18.20: + resolution: {integrity: sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-arm64/0.18.20: + resolution: {integrity: sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-x64/0.18.20: + resolution: {integrity: sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm/0.18.20: + resolution: {integrity: sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm64/0.18.20: + resolution: {integrity: sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ia32/0.18.20: + resolution: {integrity: sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-loong64/0.18.20: + resolution: {integrity: sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-mips64el/0.18.20: + resolution: {integrity: sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ppc64/0.18.20: + resolution: {integrity: sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-riscv64/0.18.20: + resolution: {integrity: sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-s390x/0.18.20: + resolution: {integrity: sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-x64/0.18.20: + resolution: {integrity: sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/netbsd-x64/0.18.20: + resolution: {integrity: sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/openbsd-x64/0.18.20: + resolution: {integrity: sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/sunos-x64/0.18.20: + resolution: {integrity: sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-arm64/0.18.20: + resolution: {integrity: sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-ia32/0.18.20: + resolution: {integrity: sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-x64/0.18.20: + resolution: {integrity: sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /ansi-styles/3.2.1: + resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} + engines: {node: '>=4'} + dependencies: + color-convert: 1.9.3 + dev: true + + /array-buffer-byte-length/1.0.0: + resolution: {integrity: sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==} + dependencies: + call-bind: 1.0.2 + is-array-buffer: 3.0.2 + dev: true + + /arraybuffer.prototype.slice/1.0.1: + resolution: {integrity: sha512-09x0ZWFEjj4WD8PDbykUwo3t9arLn8NIzmmYEJFpYekOAQjpkGSyrQhNoRTcwwcFRu+ycWF78QZ63oWTqSjBcw==} + engines: {node: '>= 0.4'} + dependencies: + array-buffer-byte-length: 1.0.0 + call-bind: 1.0.2 + define-properties: 1.2.0 + get-intrinsic: 1.2.1 + is-array-buffer: 3.0.2 + is-shared-array-buffer: 1.0.2 + dev: true + + /available-typed-arrays/1.0.5: + resolution: {integrity: sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==} + engines: {node: '>= 0.4'} + dev: true + + /balanced-match/1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + dev: true + + /brace-expansion/1.1.11: + resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} + dependencies: + balanced-match: 1.0.2 + concat-map: 0.0.1 + dev: true + + /call-bind/1.0.2: + resolution: {integrity: sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==} + dependencies: + function-bind: 1.1.1 + get-intrinsic: 1.2.1 + dev: true + + /chalk/2.4.2: + resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} + engines: {node: '>=4'} + dependencies: + ansi-styles: 3.2.1 + escape-string-regexp: 1.0.5 + supports-color: 5.5.0 + dev: true + + /color-convert/1.9.3: + resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} + dependencies: + color-name: 1.1.3 + dev: true + + /color-name/1.1.3: + resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} + dev: true + + /concat-map/0.0.1: + resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=} + dev: true + + /cross-spawn/6.0.5: + resolution: {integrity: sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==} + engines: {node: '>=4.8'} + dependencies: + nice-try: 1.0.5 + path-key: 2.0.1 + semver: 5.7.2 + shebang-command: 1.2.0 + which: 1.3.1 + dev: true + + /define-properties/1.2.0: + resolution: {integrity: sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==} + engines: {node: '>= 0.4'} + dependencies: + has-property-descriptors: 1.0.0 + object-keys: 1.1.1 + dev: true + + /error-ex/1.3.2: + resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} + dependencies: + is-arrayish: 0.2.1 + dev: true + + /es-abstract/1.22.1: + resolution: {integrity: sha512-ioRRcXMO6OFyRpyzV3kE1IIBd4WG5/kltnzdxSCqoP8CMGs/Li+M1uF5o7lOkZVFjDs+NLesthnF66Pg/0q0Lw==} + engines: {node: '>= 0.4'} + dependencies: + array-buffer-byte-length: 1.0.0 + arraybuffer.prototype.slice: 1.0.1 + available-typed-arrays: 1.0.5 + call-bind: 1.0.2 + es-set-tostringtag: 2.0.1 + es-to-primitive: 1.2.1 + function.prototype.name: 1.1.5 + get-intrinsic: 1.2.1 + get-symbol-description: 1.0.0 + globalthis: 1.0.3 + gopd: 1.0.1 + has: 1.0.3 + has-property-descriptors: 1.0.0 + has-proto: 1.0.1 + has-symbols: 1.0.3 + internal-slot: 1.0.5 + is-array-buffer: 3.0.2 + is-callable: 1.2.7 + is-negative-zero: 2.0.2 + is-regex: 1.1.4 + is-shared-array-buffer: 1.0.2 + is-string: 1.0.7 + is-typed-array: 1.1.12 + is-weakref: 1.0.2 + object-inspect: 1.12.3 + object-keys: 1.1.1 + object.assign: 4.1.4 + regexp.prototype.flags: 1.5.0 + safe-array-concat: 1.0.0 + safe-regex-test: 1.0.0 + string.prototype.trim: 1.2.7 + string.prototype.trimend: 1.0.6 + string.prototype.trimstart: 1.0.6 + typed-array-buffer: 1.0.0 + typed-array-byte-length: 1.0.0 + typed-array-byte-offset: 1.0.0 + typed-array-length: 1.0.4 + unbox-primitive: 1.0.2 + which-typed-array: 1.1.11 + dev: true + + /es-set-tostringtag/2.0.1: + resolution: {integrity: sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==} + engines: {node: '>= 0.4'} + dependencies: + get-intrinsic: 1.2.1 + has: 1.0.3 + has-tostringtag: 1.0.0 + dev: true + + /es-to-primitive/1.2.1: + resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==} + engines: {node: '>= 0.4'} + dependencies: + is-callable: 1.2.7 + is-date-object: 1.0.5 + is-symbol: 1.0.4 + dev: true + + /esbuild/0.18.20: + resolution: {integrity: sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@esbuild/android-arm': 0.18.20 + '@esbuild/android-arm64': 0.18.20 + '@esbuild/android-x64': 0.18.20 + '@esbuild/darwin-arm64': 0.18.20 + '@esbuild/darwin-x64': 0.18.20 + '@esbuild/freebsd-arm64': 0.18.20 + '@esbuild/freebsd-x64': 0.18.20 + '@esbuild/linux-arm': 0.18.20 + '@esbuild/linux-arm64': 0.18.20 + '@esbuild/linux-ia32': 0.18.20 + '@esbuild/linux-loong64': 0.18.20 + '@esbuild/linux-mips64el': 0.18.20 + '@esbuild/linux-ppc64': 0.18.20 + '@esbuild/linux-riscv64': 0.18.20 + '@esbuild/linux-s390x': 0.18.20 + '@esbuild/linux-x64': 0.18.20 + '@esbuild/netbsd-x64': 0.18.20 + '@esbuild/openbsd-x64': 0.18.20 + '@esbuild/sunos-x64': 0.18.20 + '@esbuild/win32-arm64': 0.18.20 + '@esbuild/win32-ia32': 0.18.20 + '@esbuild/win32-x64': 0.18.20 + dev: true + + /escape-string-regexp/1.0.5: + resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} + engines: {node: '>=0.8.0'} + dev: true + + /for-each/0.3.3: + resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} + dependencies: + is-callable: 1.2.7 + dev: true + + /fsevents/2.3.2: + resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /function-bind/1.1.1: + resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} + dev: true + + /function.prototype.name/1.1.5: + resolution: {integrity: sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + define-properties: 1.2.0 + es-abstract: 1.22.1 + functions-have-names: 1.2.3 + dev: true + + /functions-have-names/1.2.3: + resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} + dev: true + + /get-intrinsic/1.2.1: + resolution: {integrity: sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==} + dependencies: + function-bind: 1.1.1 + has: 1.0.3 + has-proto: 1.0.1 + has-symbols: 1.0.3 + dev: true + + /get-symbol-description/1.0.0: + resolution: {integrity: sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + get-intrinsic: 1.2.1 + dev: true + + /globalthis/1.0.3: + resolution: {integrity: sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==} + engines: {node: '>= 0.4'} + dependencies: + define-properties: 1.2.0 + dev: true + + /gopd/1.0.1: + resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} + dependencies: + get-intrinsic: 1.2.1 + dev: true + + /graceful-fs/4.2.11: + resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + dev: true + + /has-bigints/1.0.2: + resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} + dev: true + + /has-flag/3.0.0: + resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} + engines: {node: '>=4'} + dev: true + + /has-property-descriptors/1.0.0: + resolution: {integrity: sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==} + dependencies: + get-intrinsic: 1.2.1 + dev: true + + /has-proto/1.0.1: + resolution: {integrity: sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==} + engines: {node: '>= 0.4'} + dev: true + + /has-symbols/1.0.3: + resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} + engines: {node: '>= 0.4'} + dev: true + + /has-tostringtag/1.0.0: + resolution: {integrity: sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==} + engines: {node: '>= 0.4'} + dependencies: + has-symbols: 1.0.3 + dev: true + + /has/1.0.3: + resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} + engines: {node: '>= 0.4.0'} + dependencies: + function-bind: 1.1.1 + dev: true + + /hosted-git-info/2.8.9: + resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} + dev: true + + /internal-slot/1.0.5: + resolution: {integrity: sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==} + engines: {node: '>= 0.4'} + dependencies: + get-intrinsic: 1.2.1 + has: 1.0.3 + side-channel: 1.0.4 + dev: true + + /is-array-buffer/3.0.2: + resolution: {integrity: sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==} + dependencies: + call-bind: 1.0.2 + get-intrinsic: 1.2.1 + is-typed-array: 1.1.12 + dev: true + + /is-arrayish/0.2.1: + resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} + dev: true + + /is-bigint/1.0.4: + resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==} + dependencies: + has-bigints: 1.0.2 + dev: true + + /is-boolean-object/1.1.2: + resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + has-tostringtag: 1.0.0 + dev: true + + /is-callable/1.2.7: + resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} + engines: {node: '>= 0.4'} + dev: true + + /is-core-module/2.13.0: + resolution: {integrity: sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==} + dependencies: + has: 1.0.3 + dev: true + + /is-date-object/1.0.5: + resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==} + engines: {node: '>= 0.4'} + dependencies: + has-tostringtag: 1.0.0 + dev: true + + /is-negative-zero/2.0.2: + resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==} + engines: {node: '>= 0.4'} + dev: true + + /is-number-object/1.0.7: + resolution: {integrity: sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==} + engines: {node: '>= 0.4'} + dependencies: + has-tostringtag: 1.0.0 + dev: true + + /is-regex/1.1.4: + resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + has-tostringtag: 1.0.0 + dev: true + + /is-shared-array-buffer/1.0.2: + resolution: {integrity: sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==} + dependencies: + call-bind: 1.0.2 + dev: true + + /is-string/1.0.7: + resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} + engines: {node: '>= 0.4'} + dependencies: + has-tostringtag: 1.0.0 + dev: true + + /is-symbol/1.0.4: + resolution: {integrity: sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==} + engines: {node: '>= 0.4'} + dependencies: + has-symbols: 1.0.3 + dev: true + + /is-typed-array/1.1.12: + resolution: {integrity: sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==} + engines: {node: '>= 0.4'} + dependencies: + which-typed-array: 1.1.11 + dev: true + + /is-weakref/1.0.2: + resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} + dependencies: + call-bind: 1.0.2 + dev: true + + /isarray/2.0.5: + resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} + dev: true + + /isexe/2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + dev: true + + /json-parse-better-errors/1.0.2: + resolution: {integrity: sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==} + dev: true + + /load-json-file/4.0.0: + resolution: {integrity: sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw==} + engines: {node: '>=4'} + dependencies: + graceful-fs: 4.2.11 + parse-json: 4.0.0 + pify: 3.0.0 + strip-bom: 3.0.0 + dev: true + + /memorystream/0.3.1: + resolution: {integrity: sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==} + engines: {node: '>= 0.10.0'} + dev: true + + /minimatch/3.1.2: + resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + dependencies: + brace-expansion: 1.1.11 + dev: true + + /nanoid/3.3.6: + resolution: {integrity: sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + dev: true + + /nice-try/1.0.5: + resolution: {integrity: sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==} + dev: true + + /normalize-package-data/2.5.0: + resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} + dependencies: + hosted-git-info: 2.8.9 + resolve: 1.22.4 + semver: 5.7.2 + validate-npm-package-license: 3.0.4 + dev: true + + /npm-run-all/4.1.5: + resolution: {integrity: sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==} + engines: {node: '>= 4'} + hasBin: true + dependencies: + ansi-styles: 3.2.1 + chalk: 2.4.2 + cross-spawn: 6.0.5 + memorystream: 0.3.1 + minimatch: 3.1.2 + pidtree: 0.3.1 + read-pkg: 3.0.0 + shell-quote: 1.8.1 + string.prototype.padend: 3.1.4 + dev: true + + /object-inspect/1.12.3: + resolution: {integrity: sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==} + dev: true + + /object-keys/1.1.1: + resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} + engines: {node: '>= 0.4'} + dev: true + + /object.assign/4.1.4: + resolution: {integrity: sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + define-properties: 1.2.0 + has-symbols: 1.0.3 + object-keys: 1.1.1 + dev: true + + /parse-json/4.0.0: + resolution: {integrity: sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==} + engines: {node: '>=4'} + dependencies: + error-ex: 1.3.2 + json-parse-better-errors: 1.0.2 + dev: true + + /path-key/2.0.1: + resolution: {integrity: sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==} + engines: {node: '>=4'} + dev: true + + /path-parse/1.0.7: + resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} + dev: true + + /path-type/3.0.0: + resolution: {integrity: sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==} + engines: {node: '>=4'} + dependencies: + pify: 3.0.0 + dev: true + + /picocolors/1.0.0: + resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} + dev: true + + /pidtree/0.3.1: + resolution: {integrity: sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA==} + engines: {node: '>=0.10'} + hasBin: true + dev: true + + /pify/3.0.0: + resolution: {integrity: sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==} + engines: {node: '>=4'} + dev: true + + /postcss/8.4.27: + resolution: {integrity: sha512-gY/ACJtJPSmUFPDCHtX78+01fHa64FaU4zaaWfuh1MhGJISufJAH4cun6k/8fwsHYeK4UQmENQK+tRLCFJE8JQ==} + engines: {node: ^10 || ^12 || >=14} + dependencies: + nanoid: 3.3.6 + picocolors: 1.0.0 + source-map-js: 1.0.2 + dev: true + + /read-pkg/3.0.0: + resolution: {integrity: sha512-BLq/cCO9two+lBgiTYNqD6GdtK8s4NpaWrl6/rCO9w0TUS8oJl7cmToOZfRYllKTISY6nt1U7jQ53brmKqY6BA==} + engines: {node: '>=4'} + dependencies: + load-json-file: 4.0.0 + normalize-package-data: 2.5.0 + path-type: 3.0.0 + dev: true + + /regexp.prototype.flags/1.5.0: + resolution: {integrity: sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + define-properties: 1.2.0 + functions-have-names: 1.2.3 + dev: true + + /resolve/1.22.4: + resolution: {integrity: sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg==} + hasBin: true + dependencies: + is-core-module: 2.13.0 + path-parse: 1.0.7 + supports-preserve-symlinks-flag: 1.0.0 + dev: true + + /rollup/3.28.0: + resolution: {integrity: sha512-d7zhvo1OUY2SXSM6pfNjgD5+d0Nz87CUp4mt8l/GgVP3oBsPwzNvSzyu1me6BSG9JIgWNTVcafIXBIyM8yQ3yw==} + engines: {node: '>=14.18.0', npm: '>=8.0.0'} + hasBin: true + optionalDependencies: + fsevents: 2.3.2 + dev: true + + /safe-array-concat/1.0.0: + resolution: {integrity: sha512-9dVEFruWIsnie89yym+xWTAYASdpw3CJV7Li/6zBewGf9z2i1j31rP6jnY0pHEO4QZh6N0K11bFjWmdR8UGdPQ==} + engines: {node: '>=0.4'} + dependencies: + call-bind: 1.0.2 + get-intrinsic: 1.2.1 + has-symbols: 1.0.3 + isarray: 2.0.5 + dev: true + + /safe-regex-test/1.0.0: + resolution: {integrity: sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==} + dependencies: + call-bind: 1.0.2 + get-intrinsic: 1.2.1 + is-regex: 1.1.4 + dev: true + + /semver/5.7.2: + resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} + hasBin: true + dev: true + + /shebang-command/1.2.0: + resolution: {integrity: sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==} + engines: {node: '>=0.10.0'} + dependencies: + shebang-regex: 1.0.0 + dev: true + + /shebang-regex/1.0.0: + resolution: {integrity: sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==} + engines: {node: '>=0.10.0'} + dev: true + + /shell-quote/1.8.1: + resolution: {integrity: sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==} + dev: true + + /side-channel/1.0.4: + resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==} + dependencies: + call-bind: 1.0.2 + get-intrinsic: 1.2.1 + object-inspect: 1.12.3 + dev: true + + /source-map-js/1.0.2: + resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} + engines: {node: '>=0.10.0'} + dev: true + + /spdx-correct/3.2.0: + resolution: {integrity: sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==} + dependencies: + spdx-expression-parse: 3.0.1 + spdx-license-ids: 3.0.13 + dev: true + + /spdx-exceptions/2.3.0: + resolution: {integrity: sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==} + dev: true + + /spdx-expression-parse/3.0.1: + resolution: {integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==} + dependencies: + spdx-exceptions: 2.3.0 + spdx-license-ids: 3.0.13 + dev: true + + /spdx-license-ids/3.0.13: + resolution: {integrity: sha512-XkD+zwiqXHikFZm4AX/7JSCXA98U5Db4AFd5XUg/+9UNtnH75+Z9KxtpYiJZx36mUDVOwH83pl7yvCer6ewM3w==} + dev: true + + /string.prototype.padend/3.1.4: + resolution: {integrity: sha512-67otBXoksdjsnXXRUq+KMVTdlVRZ2af422Y0aTyTjVaoQkGr3mxl2Bc5emi7dOQ3OGVVQQskmLEWwFXwommpNw==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + define-properties: 1.2.0 + es-abstract: 1.22.1 + dev: true + + /string.prototype.trim/1.2.7: + resolution: {integrity: sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + define-properties: 1.2.0 + es-abstract: 1.22.1 + dev: true + + /string.prototype.trimend/1.0.6: + resolution: {integrity: sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==} + dependencies: + call-bind: 1.0.2 + define-properties: 1.2.0 + es-abstract: 1.22.1 + dev: true + + /string.prototype.trimstart/1.0.6: + resolution: {integrity: sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==} + dependencies: + call-bind: 1.0.2 + define-properties: 1.2.0 + es-abstract: 1.22.1 + dev: true + + /strip-bom/3.0.0: + resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} + engines: {node: '>=4'} + dev: true + + /supports-color/5.5.0: + resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} + engines: {node: '>=4'} + dependencies: + has-flag: 3.0.0 + dev: true + + /supports-preserve-symlinks-flag/1.0.0: + resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} + engines: {node: '>= 0.4'} + dev: true + + /typed-array-buffer/1.0.0: + resolution: {integrity: sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + get-intrinsic: 1.2.1 + is-typed-array: 1.1.12 + dev: true + + /typed-array-byte-length/1.0.0: + resolution: {integrity: sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + for-each: 0.3.3 + has-proto: 1.0.1 + is-typed-array: 1.1.12 + dev: true + + /typed-array-byte-offset/1.0.0: + resolution: {integrity: sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==} + engines: {node: '>= 0.4'} + dependencies: + available-typed-arrays: 1.0.5 + call-bind: 1.0.2 + for-each: 0.3.3 + has-proto: 1.0.1 + is-typed-array: 1.1.12 + dev: true + + /typed-array-length/1.0.4: + resolution: {integrity: sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==} + dependencies: + call-bind: 1.0.2 + for-each: 0.3.3 + is-typed-array: 1.1.12 + dev: true + + /typescript/5.1.6: + resolution: {integrity: sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==} + engines: {node: '>=14.17'} + hasBin: true + dev: true + + /unbox-primitive/1.0.2: + resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} + dependencies: + call-bind: 1.0.2 + has-bigints: 1.0.2 + has-symbols: 1.0.3 + which-boxed-primitive: 1.0.2 + dev: true + + /validate-npm-package-license/3.0.4: + resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} + dependencies: + spdx-correct: 3.2.0 + spdx-expression-parse: 3.0.1 + dev: true + + /vite/4.4.9: + resolution: {integrity: sha512-2mbUn2LlUmNASWwSCNSJ/EG2HuSRTnVNaydp6vMCm5VIqJsjMfbIWtbH2kDuwUVW5mMUKKZvGPX/rqeqVvv1XA==} + engines: {node: ^14.18.0 || >=16.0.0} + hasBin: true + peerDependencies: + '@types/node': '>= 14' + less: '*' + lightningcss: ^1.21.0 + sass: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + dependencies: + esbuild: 0.18.20 + postcss: 8.4.27 + rollup: 3.28.0 + optionalDependencies: + fsevents: 2.3.2 + dev: true + + /which-boxed-primitive/1.0.2: + resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} + dependencies: + is-bigint: 1.0.4 + is-boolean-object: 1.1.2 + is-number-object: 1.0.7 + is-string: 1.0.7 + is-symbol: 1.0.4 + dev: true + + /which-typed-array/1.1.11: + resolution: {integrity: sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew==} + engines: {node: '>= 0.4'} + dependencies: + available-typed-arrays: 1.0.5 + call-bind: 1.0.2 + for-each: 0.3.3 + gopd: 1.0.1 + has-tostringtag: 1.0.0 + dev: true + + /which/1.3.1: + resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==} + hasBin: true + dependencies: + isexe: 2.0.0 + dev: true diff --git a/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.2/public/vite.svg b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.2/public/vite.svg new file mode 100644 index 0000000..e7b8dfb --- /dev/null +++ b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.2/public/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.2/src/counter.ts b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.2/src/counter.ts new file mode 100644 index 0000000..09e5afd --- /dev/null +++ b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.2/src/counter.ts @@ -0,0 +1,9 @@ +export function setupCounter(element: HTMLButtonElement) { + let counter = 0 + const setCounter = (count: number) => { + counter = count + element.innerHTML = `count is ${counter}` + } + element.addEventListener('click', () => setCounter(counter + 1)) + setCounter(0) +} diff --git a/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.2/src/main.ts b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.2/src/main.ts new file mode 100644 index 0000000..5c558cd --- /dev/null +++ b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.2/src/main.ts @@ -0,0 +1,26 @@ +import "./style.css"; +import typescriptLogo from "./typescript.svg"; +import viteLogo from "/vite.svg"; +import { setupCounter } from "./counter"; + +document.querySelector("#app")!.innerHTML = ` + + + + + + + + Vite + TypeScript + + + + + Click on the Vite and TypeScript logos to learn more + + +`; + +let num: string = 123; + +setupCounter(document.querySelector("#counter")!); diff --git a/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.2/src/style.css b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.2/src/style.css new file mode 100644 index 0000000..b528b6c --- /dev/null +++ b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.2/src/style.css @@ -0,0 +1,97 @@ +:root { + font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; + line-height: 1.5; + font-weight: 400; + + color-scheme: light dark; + color: rgba(255, 255, 255, 0.87); + background-color: #242424; + + font-synthesis: none; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + -webkit-text-size-adjust: 100%; +} + +a { + font-weight: 500; + color: #646cff; + text-decoration: inherit; +} +a:hover { + color: #535bf2; +} + +body { + margin: 0; + display: flex; + place-items: center; + min-width: 320px; + min-height: 100vh; +} + +h1 { + font-size: 3.2em; + line-height: 1.1; +} + +#app { + max-width: 1280px; + margin: 0 auto; + padding: 2rem; + text-align: center; +} + +.logo { + height: 6em; + padding: 1.5em; + will-change: filter; + transition: filter 300ms; +} +.logo:hover { + filter: drop-shadow(0 0 2em #646cffaa); +} +.logo.vanilla:hover { + filter: drop-shadow(0 0 2em #3178c6aa); +} + +.card { + padding: 2em; +} + +.read-the-docs { + color: #888; +} + +button { + border-radius: 8px; + border: 1px solid transparent; + padding: 0.6em 1.2em; + font-size: 1em; + font-weight: 500; + font-family: inherit; + background-color: #1a1a1a; + cursor: pointer; + transition: border-color 0.25s; +} +button:hover { + border-color: #646cff; +} +button:focus, +button:focus-visible { + outline: 4px auto -webkit-focus-ring-color; +} + +@media (prefers-color-scheme: light) { + :root { + color: #213547; + background-color: #ffffff; + } + a:hover { + color: #747bff; + } + button { + background-color: #f9f9f9; + } +} diff --git a/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.2/src/typescript.svg b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.2/src/typescript.svg new file mode 100644 index 0000000..d91c910 --- /dev/null +++ b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.2/src/typescript.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.2/src/vite-env.d.ts b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.2/src/vite-env.d.ts new file mode 100644 index 0000000..11f02fe --- /dev/null +++ b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.2/src/vite-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.2/tsconfig.json b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.2/tsconfig.json new file mode 100644 index 0000000..75abdef --- /dev/null +++ b/src/010-typescript-in-the-build-process/017-blocking-your-dev-server-with-typescript.solution.2/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "module": "ESNext", + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src"] +} diff --git a/src/010-typescript-in-the-build-process/018-typescript-in-different-frameworks.explainer/explainer.ts b/src/010-typescript-in-the-build-process/018-typescript-in-different-frameworks.explainer/explainer.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.problem/.gitignore b/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.problem/.gitignore new file mode 100644 index 0000000..a547bf3 --- /dev/null +++ b/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.problem/.gitignore @@ -0,0 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.problem/index.html b/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.problem/index.html new file mode 100644 index 0000000..f86e483 --- /dev/null +++ b/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.problem/index.html @@ -0,0 +1,13 @@ + + + + + + + Vite + TS + + + + + + diff --git a/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.problem/package.json b/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.problem/package.json new file mode 100644 index 0000000..0c4b2ec --- /dev/null +++ b/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.problem/package.json @@ -0,0 +1,16 @@ +{ + "name": "013-setting-up-a-frontend-app-with-vite.solution", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "ci": "tsc", + "dev": "vite", + "build": "tsc && vite build", + "preview": "vite preview" + }, + "devDependencies": { + "typescript": "^5.0.2", + "vite": "^4.4.5" + } +} diff --git a/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.problem/pnpm-lock.yaml b/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.problem/pnpm-lock.yaml new file mode 100644 index 0000000..9af6dfc --- /dev/null +++ b/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.problem/pnpm-lock.yaml @@ -0,0 +1,320 @@ +lockfileVersion: 5.4 + +specifiers: + typescript: ^5.0.2 + vite: ^4.4.5 + +devDependencies: + typescript: 5.1.6 + vite: 4.4.9 + +packages: + + /@esbuild/android-arm/0.18.20: + resolution: {integrity: sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-arm64/0.18.20: + resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-x64/0.18.20: + resolution: {integrity: sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-arm64/0.18.20: + resolution: {integrity: sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-x64/0.18.20: + resolution: {integrity: sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-arm64/0.18.20: + resolution: {integrity: sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-x64/0.18.20: + resolution: {integrity: sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm/0.18.20: + resolution: {integrity: sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm64/0.18.20: + resolution: {integrity: sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ia32/0.18.20: + resolution: {integrity: sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-loong64/0.18.20: + resolution: {integrity: sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-mips64el/0.18.20: + resolution: {integrity: sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ppc64/0.18.20: + resolution: {integrity: sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-riscv64/0.18.20: + resolution: {integrity: sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-s390x/0.18.20: + resolution: {integrity: sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-x64/0.18.20: + resolution: {integrity: sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/netbsd-x64/0.18.20: + resolution: {integrity: sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/openbsd-x64/0.18.20: + resolution: {integrity: sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/sunos-x64/0.18.20: + resolution: {integrity: sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-arm64/0.18.20: + resolution: {integrity: sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-ia32/0.18.20: + resolution: {integrity: sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-x64/0.18.20: + resolution: {integrity: sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /esbuild/0.18.20: + resolution: {integrity: sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@esbuild/android-arm': 0.18.20 + '@esbuild/android-arm64': 0.18.20 + '@esbuild/android-x64': 0.18.20 + '@esbuild/darwin-arm64': 0.18.20 + '@esbuild/darwin-x64': 0.18.20 + '@esbuild/freebsd-arm64': 0.18.20 + '@esbuild/freebsd-x64': 0.18.20 + '@esbuild/linux-arm': 0.18.20 + '@esbuild/linux-arm64': 0.18.20 + '@esbuild/linux-ia32': 0.18.20 + '@esbuild/linux-loong64': 0.18.20 + '@esbuild/linux-mips64el': 0.18.20 + '@esbuild/linux-ppc64': 0.18.20 + '@esbuild/linux-riscv64': 0.18.20 + '@esbuild/linux-s390x': 0.18.20 + '@esbuild/linux-x64': 0.18.20 + '@esbuild/netbsd-x64': 0.18.20 + '@esbuild/openbsd-x64': 0.18.20 + '@esbuild/sunos-x64': 0.18.20 + '@esbuild/win32-arm64': 0.18.20 + '@esbuild/win32-ia32': 0.18.20 + '@esbuild/win32-x64': 0.18.20 + dev: true + + /fsevents/2.3.2: + resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /nanoid/3.3.6: + resolution: {integrity: sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + dev: true + + /picocolors/1.0.0: + resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} + dev: true + + /postcss/8.4.27: + resolution: {integrity: sha512-gY/ACJtJPSmUFPDCHtX78+01fHa64FaU4zaaWfuh1MhGJISufJAH4cun6k/8fwsHYeK4UQmENQK+tRLCFJE8JQ==} + engines: {node: ^10 || ^12 || >=14} + dependencies: + nanoid: 3.3.6 + picocolors: 1.0.0 + source-map-js: 1.0.2 + dev: true + + /rollup/3.28.0: + resolution: {integrity: sha512-d7zhvo1OUY2SXSM6pfNjgD5+d0Nz87CUp4mt8l/GgVP3oBsPwzNvSzyu1me6BSG9JIgWNTVcafIXBIyM8yQ3yw==} + engines: {node: '>=14.18.0', npm: '>=8.0.0'} + hasBin: true + optionalDependencies: + fsevents: 2.3.2 + dev: true + + /source-map-js/1.0.2: + resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} + engines: {node: '>=0.10.0'} + dev: true + + /typescript/5.1.6: + resolution: {integrity: sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==} + engines: {node: '>=14.17'} + hasBin: true + dev: true + + /vite/4.4.9: + resolution: {integrity: sha512-2mbUn2LlUmNASWwSCNSJ/EG2HuSRTnVNaydp6vMCm5VIqJsjMfbIWtbH2kDuwUVW5mMUKKZvGPX/rqeqVvv1XA==} + engines: {node: ^14.18.0 || >=16.0.0} + hasBin: true + peerDependencies: + '@types/node': '>= 14' + less: '*' + lightningcss: ^1.21.0 + sass: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + dependencies: + esbuild: 0.18.20 + postcss: 8.4.27 + rollup: 3.28.0 + optionalDependencies: + fsevents: 2.3.2 + dev: true diff --git a/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.problem/public/vite.svg b/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.problem/public/vite.svg new file mode 100644 index 0000000..e7b8dfb --- /dev/null +++ b/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.problem/public/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.problem/src/counter.ts b/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.problem/src/counter.ts new file mode 100644 index 0000000..09e5afd --- /dev/null +++ b/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.problem/src/counter.ts @@ -0,0 +1,9 @@ +export function setupCounter(element: HTMLButtonElement) { + let counter = 0 + const setCounter = (count: number) => { + counter = count + element.innerHTML = `count is ${counter}` + } + element.addEventListener('click', () => setCounter(counter + 1)) + setCounter(0) +} diff --git a/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.problem/src/main.ts b/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.problem/src/main.ts new file mode 100644 index 0000000..791547b --- /dev/null +++ b/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.problem/src/main.ts @@ -0,0 +1,24 @@ +import './style.css' +import typescriptLogo from './typescript.svg' +import viteLogo from '/vite.svg' +import { setupCounter } from './counter.ts' + +document.querySelector('#app')!.innerHTML = ` + + + + + + + + Vite + TypeScript + + + + + Click on the Vite and TypeScript logos to learn more + + +` + +setupCounter(document.querySelector('#counter')!) diff --git a/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.problem/src/style.css b/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.problem/src/style.css new file mode 100644 index 0000000..b528b6c --- /dev/null +++ b/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.problem/src/style.css @@ -0,0 +1,97 @@ +:root { + font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; + line-height: 1.5; + font-weight: 400; + + color-scheme: light dark; + color: rgba(255, 255, 255, 0.87); + background-color: #242424; + + font-synthesis: none; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + -webkit-text-size-adjust: 100%; +} + +a { + font-weight: 500; + color: #646cff; + text-decoration: inherit; +} +a:hover { + color: #535bf2; +} + +body { + margin: 0; + display: flex; + place-items: center; + min-width: 320px; + min-height: 100vh; +} + +h1 { + font-size: 3.2em; + line-height: 1.1; +} + +#app { + max-width: 1280px; + margin: 0 auto; + padding: 2rem; + text-align: center; +} + +.logo { + height: 6em; + padding: 1.5em; + will-change: filter; + transition: filter 300ms; +} +.logo:hover { + filter: drop-shadow(0 0 2em #646cffaa); +} +.logo.vanilla:hover { + filter: drop-shadow(0 0 2em #3178c6aa); +} + +.card { + padding: 2em; +} + +.read-the-docs { + color: #888; +} + +button { + border-radius: 8px; + border: 1px solid transparent; + padding: 0.6em 1.2em; + font-size: 1em; + font-weight: 500; + font-family: inherit; + background-color: #1a1a1a; + cursor: pointer; + transition: border-color 0.25s; +} +button:hover { + border-color: #646cff; +} +button:focus, +button:focus-visible { + outline: 4px auto -webkit-focus-ring-color; +} + +@media (prefers-color-scheme: light) { + :root { + color: #213547; + background-color: #ffffff; + } + a:hover { + color: #747bff; + } + button { + background-color: #f9f9f9; + } +} diff --git a/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.problem/src/typescript.svg b/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.problem/src/typescript.svg new file mode 100644 index 0000000..d91c910 --- /dev/null +++ b/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.problem/src/typescript.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.problem/src/vite-env.d.ts b/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.problem/src/vite-env.d.ts new file mode 100644 index 0000000..11f02fe --- /dev/null +++ b/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.problem/src/vite-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.problem/tsconfig.json b/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.problem/tsconfig.json new file mode 100644 index 0000000..75abdef --- /dev/null +++ b/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.problem/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "module": "ESNext", + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src"] +} diff --git a/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.solution/.gitignore b/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.solution/.gitignore new file mode 100644 index 0000000..a547bf3 --- /dev/null +++ b/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.solution/.gitignore @@ -0,0 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.solution/index.html b/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.solution/index.html new file mode 100644 index 0000000..f86e483 --- /dev/null +++ b/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.solution/index.html @@ -0,0 +1,13 @@ + + + + + + + Vite + TS + + + + + + diff --git a/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.solution/package.json b/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.solution/package.json new file mode 100644 index 0000000..8fcf5c0 --- /dev/null +++ b/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.solution/package.json @@ -0,0 +1,18 @@ +{ + "name": "013-setting-up-a-frontend-app-with-vite.solution", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "do-something": "tsx scripts/doSomething.ts", + "ci": "tsc", + "dev": "vite", + "build": "tsc && vite build", + "preview": "vite preview" + }, + "devDependencies": { + "tsx": "^3.12.7", + "typescript": "^5.0.2", + "vite": "^4.4.5" + } +} diff --git a/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.solution/pnpm-lock.yaml b/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.solution/pnpm-lock.yaml new file mode 100644 index 0000000..507c4e2 --- /dev/null +++ b/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.solution/pnpm-lock.yaml @@ -0,0 +1,608 @@ +lockfileVersion: 5.4 + +specifiers: + tsx: ^3.12.7 + typescript: ^5.0.2 + vite: ^4.4.5 + +devDependencies: + tsx: 3.12.7 + typescript: 5.1.6 + vite: 4.4.9 + +packages: + + /@esbuild-kit/cjs-loader/2.4.2: + resolution: {integrity: sha512-BDXFbYOJzT/NBEtp71cvsrGPwGAMGRB/349rwKuoxNSiKjPraNNnlK6MIIabViCjqZugu6j+xeMDlEkWdHHJSg==} + dependencies: + '@esbuild-kit/core-utils': 3.1.0 + get-tsconfig: 4.7.0 + dev: true + + /@esbuild-kit/core-utils/3.1.0: + resolution: {integrity: sha512-Uuk8RpCg/7fdHSceR1M6XbSZFSuMrxcePFuGgyvsBn+u339dk5OeL4jv2EojwTN2st/unJGsVm4qHWjWNmJ/tw==} + dependencies: + esbuild: 0.17.19 + source-map-support: 0.5.21 + dev: true + + /@esbuild-kit/esm-loader/2.5.5: + resolution: {integrity: sha512-Qwfvj/qoPbClxCRNuac1Du01r9gvNOT+pMYtJDapfB1eoGN1YlJ1BixLyL9WVENRx5RXgNLdfYdx/CuswlGhMw==} + dependencies: + '@esbuild-kit/core-utils': 3.1.0 + get-tsconfig: 4.7.0 + dev: true + + /@esbuild/android-arm/0.17.19: + resolution: {integrity: sha512-rIKddzqhmav7MSmoFCmDIb6e2W57geRsM94gV2l38fzhXMwq7hZoClug9USI2pFRGL06f4IOPHHpFNOkWieR8A==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-arm/0.18.20: + resolution: {integrity: sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-arm64/0.17.19: + resolution: {integrity: sha512-KBMWvEZooR7+kzY0BtbTQn0OAYY7CsiydT63pVEaPtVYF0hXbUaOyZog37DKxK7NF3XacBJOpYT4adIJh+avxA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-arm64/0.18.20: + resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-x64/0.17.19: + resolution: {integrity: sha512-uUTTc4xGNDT7YSArp/zbtmbhO0uEEK9/ETW29Wk1thYUJBz3IVnvgEiEwEa9IeLyvnpKrWK64Utw2bgUmDveww==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-x64/0.18.20: + resolution: {integrity: sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-arm64/0.17.19: + resolution: {integrity: sha512-80wEoCfF/hFKM6WE1FyBHc9SfUblloAWx6FJkFWTWiCoht9Mc0ARGEM47e67W9rI09YoUxJL68WHfDRYEAvOhg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-arm64/0.18.20: + resolution: {integrity: sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-x64/0.17.19: + resolution: {integrity: sha512-IJM4JJsLhRYr9xdtLytPLSH9k/oxR3boaUIYiHkAawtwNOXKE8KoU8tMvryogdcT8AU+Bflmh81Xn6Q0vTZbQw==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-x64/0.18.20: + resolution: {integrity: sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-arm64/0.17.19: + resolution: {integrity: sha512-pBwbc7DufluUeGdjSU5Si+P3SoMF5DQ/F/UmTSb8HXO80ZEAJmrykPyzo1IfNbAoaqw48YRpv8shwd1NoI0jcQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-arm64/0.18.20: + resolution: {integrity: sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-x64/0.17.19: + resolution: {integrity: sha512-4lu+n8Wk0XlajEhbEffdy2xy53dpR06SlzvhGByyg36qJw6Kpfk7cp45DR/62aPH9mtJRmIyrXAS5UWBrJT6TQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-x64/0.18.20: + resolution: {integrity: sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm/0.17.19: + resolution: {integrity: sha512-cdmT3KxjlOQ/gZ2cjfrQOtmhG4HJs6hhvm3mWSRDPtZ/lP5oe8FWceS10JaSJC13GBd4eH/haHnqf7hhGNLerA==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm/0.18.20: + resolution: {integrity: sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm64/0.17.19: + resolution: {integrity: sha512-ct1Tg3WGwd3P+oZYqic+YZF4snNl2bsnMKRkb3ozHmnM0dGWuxcPTTntAF6bOP0Sp4x0PjSF+4uHQ1xvxfRKqg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm64/0.18.20: + resolution: {integrity: sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ia32/0.17.19: + resolution: {integrity: sha512-w4IRhSy1VbsNxHRQpeGCHEmibqdTUx61Vc38APcsRbuVgK0OPEnQ0YD39Brymn96mOx48Y2laBQGqgZ0j9w6SQ==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ia32/0.18.20: + resolution: {integrity: sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-loong64/0.17.19: + resolution: {integrity: sha512-2iAngUbBPMq439a+z//gE+9WBldoMp1s5GWsUSgqHLzLJ9WoZLZhpwWuym0u0u/4XmZ3gpHmzV84PonE+9IIdQ==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-loong64/0.18.20: + resolution: {integrity: sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-mips64el/0.17.19: + resolution: {integrity: sha512-LKJltc4LVdMKHsrFe4MGNPp0hqDFA1Wpt3jE1gEyM3nKUvOiO//9PheZZHfYRfYl6AwdTH4aTcXSqBerX0ml4A==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-mips64el/0.18.20: + resolution: {integrity: sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ppc64/0.17.19: + resolution: {integrity: sha512-/c/DGybs95WXNS8y3Ti/ytqETiW7EU44MEKuCAcpPto3YjQbyK3IQVKfF6nbghD7EcLUGl0NbiL5Rt5DMhn5tg==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ppc64/0.18.20: + resolution: {integrity: sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-riscv64/0.17.19: + resolution: {integrity: sha512-FC3nUAWhvFoutlhAkgHf8f5HwFWUL6bYdvLc/TTuxKlvLi3+pPzdZiFKSWz/PF30TB1K19SuCxDTI5KcqASJqA==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-riscv64/0.18.20: + resolution: {integrity: sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-s390x/0.17.19: + resolution: {integrity: sha512-IbFsFbxMWLuKEbH+7sTkKzL6NJmG2vRyy6K7JJo55w+8xDk7RElYn6xvXtDW8HCfoKBFK69f3pgBJSUSQPr+4Q==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-s390x/0.18.20: + resolution: {integrity: sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-x64/0.17.19: + resolution: {integrity: sha512-68ngA9lg2H6zkZcyp22tsVt38mlhWde8l3eJLWkyLrp4HwMUr3c1s/M2t7+kHIhvMjglIBrFpncX1SzMckomGw==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-x64/0.18.20: + resolution: {integrity: sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/netbsd-x64/0.17.19: + resolution: {integrity: sha512-CwFq42rXCR8TYIjIfpXCbRX0rp1jo6cPIUPSaWwzbVI4aOfX96OXY8M6KNmtPcg7QjYeDmN+DD0Wp3LaBOLf4Q==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/netbsd-x64/0.18.20: + resolution: {integrity: sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/openbsd-x64/0.17.19: + resolution: {integrity: sha512-cnq5brJYrSZ2CF6c35eCmviIN3k3RczmHz8eYaVlNasVqsNY+JKohZU5MKmaOI+KkllCdzOKKdPs762VCPC20g==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/openbsd-x64/0.18.20: + resolution: {integrity: sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/sunos-x64/0.17.19: + resolution: {integrity: sha512-vCRT7yP3zX+bKWFeP/zdS6SqdWB8OIpaRq/mbXQxTGHnIxspRtigpkUcDMlSCOejlHowLqII7K2JKevwyRP2rg==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + + /@esbuild/sunos-x64/0.18.20: + resolution: {integrity: sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-arm64/0.17.19: + resolution: {integrity: sha512-yYx+8jwowUstVdorcMdNlzklLYhPxjniHWFKgRqH7IFlUEa0Umu3KuYplf1HUZZ422e3NU9F4LGb+4O0Kdcaag==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-arm64/0.18.20: + resolution: {integrity: sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-ia32/0.17.19: + resolution: {integrity: sha512-eggDKanJszUtCdlVs0RB+h35wNlb5v4TWEkq4vZcmVt5u/HiDZrTXe2bWFQUez3RgNHwx/x4sk5++4NSSicKkw==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-ia32/0.18.20: + resolution: {integrity: sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-x64/0.17.19: + resolution: {integrity: sha512-lAhycmKnVOuRYNtRtatQR1LPQf2oYCkRGkSFnseDAKPl8lu5SOsK/e1sXe5a0Pc5kHIHe6P2I/ilntNv2xf3cA==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-x64/0.18.20: + resolution: {integrity: sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /buffer-from/1.1.2: + resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + dev: true + + /esbuild/0.17.19: + resolution: {integrity: sha512-XQ0jAPFkK/u3LcVRcvVHQcTIqD6E2H1fvZMA5dQPSOWb3suUbWbfbRf94pjc0bNzRYLfIrDRQXr7X+LHIm5oHw==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@esbuild/android-arm': 0.17.19 + '@esbuild/android-arm64': 0.17.19 + '@esbuild/android-x64': 0.17.19 + '@esbuild/darwin-arm64': 0.17.19 + '@esbuild/darwin-x64': 0.17.19 + '@esbuild/freebsd-arm64': 0.17.19 + '@esbuild/freebsd-x64': 0.17.19 + '@esbuild/linux-arm': 0.17.19 + '@esbuild/linux-arm64': 0.17.19 + '@esbuild/linux-ia32': 0.17.19 + '@esbuild/linux-loong64': 0.17.19 + '@esbuild/linux-mips64el': 0.17.19 + '@esbuild/linux-ppc64': 0.17.19 + '@esbuild/linux-riscv64': 0.17.19 + '@esbuild/linux-s390x': 0.17.19 + '@esbuild/linux-x64': 0.17.19 + '@esbuild/netbsd-x64': 0.17.19 + '@esbuild/openbsd-x64': 0.17.19 + '@esbuild/sunos-x64': 0.17.19 + '@esbuild/win32-arm64': 0.17.19 + '@esbuild/win32-ia32': 0.17.19 + '@esbuild/win32-x64': 0.17.19 + dev: true + + /esbuild/0.18.20: + resolution: {integrity: sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@esbuild/android-arm': 0.18.20 + '@esbuild/android-arm64': 0.18.20 + '@esbuild/android-x64': 0.18.20 + '@esbuild/darwin-arm64': 0.18.20 + '@esbuild/darwin-x64': 0.18.20 + '@esbuild/freebsd-arm64': 0.18.20 + '@esbuild/freebsd-x64': 0.18.20 + '@esbuild/linux-arm': 0.18.20 + '@esbuild/linux-arm64': 0.18.20 + '@esbuild/linux-ia32': 0.18.20 + '@esbuild/linux-loong64': 0.18.20 + '@esbuild/linux-mips64el': 0.18.20 + '@esbuild/linux-ppc64': 0.18.20 + '@esbuild/linux-riscv64': 0.18.20 + '@esbuild/linux-s390x': 0.18.20 + '@esbuild/linux-x64': 0.18.20 + '@esbuild/netbsd-x64': 0.18.20 + '@esbuild/openbsd-x64': 0.18.20 + '@esbuild/sunos-x64': 0.18.20 + '@esbuild/win32-arm64': 0.18.20 + '@esbuild/win32-ia32': 0.18.20 + '@esbuild/win32-x64': 0.18.20 + dev: true + + /fsevents/2.3.2: + resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /get-tsconfig/4.7.0: + resolution: {integrity: sha512-pmjiZ7xtB8URYm74PlGJozDNyhvsVLUcpBa8DZBG3bWHwaHa9bPiRpiSfovw+fjhwONSCWKRyk+JQHEGZmMrzw==} + dependencies: + resolve-pkg-maps: 1.0.0 + dev: true + + /nanoid/3.3.6: + resolution: {integrity: sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + dev: true + + /picocolors/1.0.0: + resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} + dev: true + + /postcss/8.4.27: + resolution: {integrity: sha512-gY/ACJtJPSmUFPDCHtX78+01fHa64FaU4zaaWfuh1MhGJISufJAH4cun6k/8fwsHYeK4UQmENQK+tRLCFJE8JQ==} + engines: {node: ^10 || ^12 || >=14} + dependencies: + nanoid: 3.3.6 + picocolors: 1.0.0 + source-map-js: 1.0.2 + dev: true + + /resolve-pkg-maps/1.0.0: + resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} + dev: true + + /rollup/3.28.0: + resolution: {integrity: sha512-d7zhvo1OUY2SXSM6pfNjgD5+d0Nz87CUp4mt8l/GgVP3oBsPwzNvSzyu1me6BSG9JIgWNTVcafIXBIyM8yQ3yw==} + engines: {node: '>=14.18.0', npm: '>=8.0.0'} + hasBin: true + optionalDependencies: + fsevents: 2.3.2 + dev: true + + /source-map-js/1.0.2: + resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} + engines: {node: '>=0.10.0'} + dev: true + + /source-map-support/0.5.21: + resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} + dependencies: + buffer-from: 1.1.2 + source-map: 0.6.1 + dev: true + + /source-map/0.6.1: + resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} + engines: {node: '>=0.10.0'} + dev: true + + /tsx/3.12.7: + resolution: {integrity: sha512-C2Ip+jPmqKd1GWVQDvz/Eyc6QJbGfE7NrR3fx5BpEHMZsEHoIxHL1j+lKdGobr8ovEyqeNkPLSKp6SCSOt7gmw==} + hasBin: true + dependencies: + '@esbuild-kit/cjs-loader': 2.4.2 + '@esbuild-kit/core-utils': 3.1.0 + '@esbuild-kit/esm-loader': 2.5.5 + optionalDependencies: + fsevents: 2.3.2 + dev: true + + /typescript/5.1.6: + resolution: {integrity: sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==} + engines: {node: '>=14.17'} + hasBin: true + dev: true + + /vite/4.4.9: + resolution: {integrity: sha512-2mbUn2LlUmNASWwSCNSJ/EG2HuSRTnVNaydp6vMCm5VIqJsjMfbIWtbH2kDuwUVW5mMUKKZvGPX/rqeqVvv1XA==} + engines: {node: ^14.18.0 || >=16.0.0} + hasBin: true + peerDependencies: + '@types/node': '>= 14' + less: '*' + lightningcss: ^1.21.0 + sass: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + dependencies: + esbuild: 0.18.20 + postcss: 8.4.27 + rollup: 3.28.0 + optionalDependencies: + fsevents: 2.3.2 + dev: true diff --git a/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.solution/public/vite.svg b/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.solution/public/vite.svg new file mode 100644 index 0000000..e7b8dfb --- /dev/null +++ b/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.solution/public/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.solution/scripts/doSomething.ts b/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.solution/scripts/doSomething.ts new file mode 100644 index 0000000..de9598d --- /dev/null +++ b/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.solution/scripts/doSomething.ts @@ -0,0 +1,5 @@ +console.log("The script is working!"); + +const [, , ...args] = process.argv; + +console.log(args); diff --git a/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.solution/src/counter.ts b/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.solution/src/counter.ts new file mode 100644 index 0000000..09e5afd --- /dev/null +++ b/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.solution/src/counter.ts @@ -0,0 +1,9 @@ +export function setupCounter(element: HTMLButtonElement) { + let counter = 0 + const setCounter = (count: number) => { + counter = count + element.innerHTML = `count is ${counter}` + } + element.addEventListener('click', () => setCounter(counter + 1)) + setCounter(0) +} diff --git a/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.solution/src/main.ts b/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.solution/src/main.ts new file mode 100644 index 0000000..791547b --- /dev/null +++ b/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.solution/src/main.ts @@ -0,0 +1,24 @@ +import './style.css' +import typescriptLogo from './typescript.svg' +import viteLogo from '/vite.svg' +import { setupCounter } from './counter.ts' + +document.querySelector('#app')!.innerHTML = ` + + + + + + + + Vite + TypeScript + + + + + Click on the Vite and TypeScript logos to learn more + + +` + +setupCounter(document.querySelector('#counter')!) diff --git a/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.solution/src/style.css b/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.solution/src/style.css new file mode 100644 index 0000000..b528b6c --- /dev/null +++ b/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.solution/src/style.css @@ -0,0 +1,97 @@ +:root { + font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; + line-height: 1.5; + font-weight: 400; + + color-scheme: light dark; + color: rgba(255, 255, 255, 0.87); + background-color: #242424; + + font-synthesis: none; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + -webkit-text-size-adjust: 100%; +} + +a { + font-weight: 500; + color: #646cff; + text-decoration: inherit; +} +a:hover { + color: #535bf2; +} + +body { + margin: 0; + display: flex; + place-items: center; + min-width: 320px; + min-height: 100vh; +} + +h1 { + font-size: 3.2em; + line-height: 1.1; +} + +#app { + max-width: 1280px; + margin: 0 auto; + padding: 2rem; + text-align: center; +} + +.logo { + height: 6em; + padding: 1.5em; + will-change: filter; + transition: filter 300ms; +} +.logo:hover { + filter: drop-shadow(0 0 2em #646cffaa); +} +.logo.vanilla:hover { + filter: drop-shadow(0 0 2em #3178c6aa); +} + +.card { + padding: 2em; +} + +.read-the-docs { + color: #888; +} + +button { + border-radius: 8px; + border: 1px solid transparent; + padding: 0.6em 1.2em; + font-size: 1em; + font-weight: 500; + font-family: inherit; + background-color: #1a1a1a; + cursor: pointer; + transition: border-color 0.25s; +} +button:hover { + border-color: #646cff; +} +button:focus, +button:focus-visible { + outline: 4px auto -webkit-focus-ring-color; +} + +@media (prefers-color-scheme: light) { + :root { + color: #213547; + background-color: #ffffff; + } + a:hover { + color: #747bff; + } + button { + background-color: #f9f9f9; + } +} diff --git a/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.solution/src/typescript.svg b/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.solution/src/typescript.svg new file mode 100644 index 0000000..d91c910 --- /dev/null +++ b/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.solution/src/typescript.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.solution/src/vite-env.d.ts b/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.solution/src/vite-env.d.ts new file mode 100644 index 0000000..11f02fe --- /dev/null +++ b/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.solution/src/vite-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.solution/tsconfig.json b/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.solution/tsconfig.json new file mode 100644 index 0000000..75abdef --- /dev/null +++ b/src/010-typescript-in-the-build-process/019-using-tsx-to-create-quick-scripts.solution/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "module": "ESNext", + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src"] +} diff --git a/src/015-essential-types-and-annotations/020-basic-types-with-function-parameters.problem.ts b/src/015-essential-types-and-annotations/020-basic-types-with-function-parameters.problem.ts new file mode 100644 index 0000000..11fa918 --- /dev/null +++ b/src/015-essential-types-and-annotations/020-basic-types-with-function-parameters.problem.ts @@ -0,0 +1,11 @@ +// CODE + +const add = (a: boolean, b: boolean) => { + return a + b; +}; + +// TESTS + +const result = add(1, 2); + +type test = Expect>; diff --git a/src/015-essential-types-and-annotations/021-basic-types-with-function-parameters.solution.ts b/src/015-essential-types-and-annotations/021-basic-types-with-function-parameters.solution.ts new file mode 100644 index 0000000..3291437 --- /dev/null +++ b/src/015-essential-types-and-annotations/021-basic-types-with-function-parameters.solution.ts @@ -0,0 +1,11 @@ +// CODE + +const add = (a: number, b: number) => { + return a + b; +}; + +// TESTS + +const result = add(1, 2); + +type test = Expect>; diff --git a/src/015-essential-types-and-annotations/022-annotating-empty-parameters.problem.ts b/src/015-essential-types-and-annotations/022-annotating-empty-parameters.problem.ts new file mode 100644 index 0000000..b4a6581 --- /dev/null +++ b/src/015-essential-types-and-annotations/022-annotating-empty-parameters.problem.ts @@ -0,0 +1,11 @@ +// CODE + +const concatTwoStrings = (a, b) => { + return [a, b].join(" "); +}; + +// TESTS + +const result = concatTwoStrings("Hello", "World"); + +type test = Expect>; diff --git a/src/015-essential-types-and-annotations/022-annotating-empty-parameters.solution.ts b/src/015-essential-types-and-annotations/022-annotating-empty-parameters.solution.ts new file mode 100644 index 0000000..e425ed3 --- /dev/null +++ b/src/015-essential-types-and-annotations/022-annotating-empty-parameters.solution.ts @@ -0,0 +1,11 @@ +// CODE + +const concatTwoStrings = (a: string, b: string) => { + return [a, b].join(" "); +}; + +// TESTS + +const result = concatTwoStrings("Hello", "World"); + +type test = Expect>; diff --git a/src/015-essential-types-and-annotations/023-all-types.problem.ts b/src/015-essential-types-and-annotations/023-all-types.problem.ts new file mode 100644 index 0000000..9a7aa9f --- /dev/null +++ b/src/015-essential-types-and-annotations/023-all-types.problem.ts @@ -0,0 +1,5 @@ +let example1: string = "Hello World!"; +let example2: string = 42; +let example3: string = true; +let example4: string = Symbol(); +let example5: string = 123n; diff --git a/src/015-essential-types-and-annotations/023-all-types.solution.1.ts b/src/015-essential-types-and-annotations/023-all-types.solution.1.ts new file mode 100644 index 0000000..5778f8b --- /dev/null +++ b/src/015-essential-types-and-annotations/023-all-types.solution.1.ts @@ -0,0 +1,5 @@ +let example1: string = "Hello World!"; +let example2: number = 42; +let example3: boolean = true; +let example4: symbol = Symbol(); +let example5: bigint = 123n; diff --git a/src/015-essential-types-and-annotations/023-all-types.solution.2.ts b/src/015-essential-types-and-annotations/023-all-types.solution.2.ts new file mode 100644 index 0000000..4606fa6 --- /dev/null +++ b/src/015-essential-types-and-annotations/023-all-types.solution.2.ts @@ -0,0 +1,5 @@ +let example1 = "Hello World!"; +let example2 = 42; +let example3 = true; +let example4 = Symbol(); +let example5 = 123n; diff --git a/src/015-essential-types-and-annotations/024-optional-function-parameters.problem.ts b/src/015-essential-types-and-annotations/024-optional-function-parameters.problem.ts new file mode 100644 index 0000000..a4af788 --- /dev/null +++ b/src/015-essential-types-and-annotations/024-optional-function-parameters.problem.ts @@ -0,0 +1,15 @@ +const concatName = (first: string, last?: string) => { + if (!last) { + return first; + } + + return `${first} ${last}`; +}; + +const result = concatName("John", "Doe"); + +type test = Expect>; + +const result2 = concatName("John"); + +type test2 = Expect>; diff --git a/src/015-essential-types-and-annotations/024-optional-function-parameters.solution.ts b/src/015-essential-types-and-annotations/024-optional-function-parameters.solution.ts new file mode 100644 index 0000000..a4af788 --- /dev/null +++ b/src/015-essential-types-and-annotations/024-optional-function-parameters.solution.ts @@ -0,0 +1,15 @@ +const concatName = (first: string, last?: string) => { + if (!last) { + return first; + } + + return `${first} ${last}`; +}; + +const result = concatName("John", "Doe"); + +type test = Expect>; + +const result2 = concatName("John"); + +type test2 = Expect>; diff --git a/src/015-essential-types-and-annotations/025-default-parameters.problem.ts b/src/015-essential-types-and-annotations/025-default-parameters.problem.ts new file mode 100644 index 0000000..bfa719c --- /dev/null +++ b/src/015-essential-types-and-annotations/025-default-parameters.problem.ts @@ -0,0 +1,25 @@ +import { expect, it } from "vitest"; + +const concatName = (first: string, last?: string) => { + if (!last) { + return first; + } + + return `${first} ${last}`; +}; + +it("should return the full name", () => { + const result = concatName("John", "Doe"); + + type test = Expect>; + + expect(result).toEqual("John Doe"); +}); + +it("should return the first name", () => { + const result = concatName("John"); + + type test = Expect>; + + expect(result).toEqual("John Pocock"); +}); diff --git a/src/015-essential-types-and-annotations/025-default-parameters.solution.ts b/src/015-essential-types-and-annotations/025-default-parameters.solution.ts new file mode 100644 index 0000000..a867a67 --- /dev/null +++ b/src/015-essential-types-and-annotations/025-default-parameters.solution.ts @@ -0,0 +1,25 @@ +import { expect, it } from "vitest"; + +const concatName = (first: string, last = "Pocock") => { + if (!last) { + return first; + } + + return `${first} ${last}`; +}; + +it("should return the full name", () => { + const result = concatName("John", "Doe"); + + type test = Expect>; + + expect(result).toEqual("John Doe"); +}); + +it("should return the first name", () => { + const result = concatName("John"); + + type test = Expect>; + + expect(result).toEqual("John Pocock"); +}); diff --git a/src/015-essential-types-and-annotations/026-object-literal-types.problem.ts b/src/015-essential-types-and-annotations/026-object-literal-types.problem.ts new file mode 100644 index 0000000..8b2d1f1 --- /dev/null +++ b/src/015-essential-types-and-annotations/026-object-literal-types.problem.ts @@ -0,0 +1,16 @@ +import { expect, it } from "vitest"; + +const concatName = (user) => { + return `${user.first} ${user.last}`; +}; + +it("should return the full name", () => { + const result = concatName({ + first: "John", + last: "Doe", + }); + + type test = Expect>; + + expect(result).toEqual("John Doe"); +}); diff --git a/src/015-essential-types-and-annotations/026-object-literal-types.solution.ts b/src/015-essential-types-and-annotations/026-object-literal-types.solution.ts new file mode 100644 index 0000000..a5af713 --- /dev/null +++ b/src/015-essential-types-and-annotations/026-object-literal-types.solution.ts @@ -0,0 +1,16 @@ +import { expect, it } from "vitest"; + +const concatName = (user: { first: string; last: string }) => { + return `${user.first} ${user.last}`; +}; + +it("should return the full name", () => { + const result = concatName({ + first: "John", + last: "Doe", + }); + + type test = Expect>; + + expect(result).toEqual("John Doe"); +}); diff --git a/src/015-essential-types-and-annotations/027-optional-property-types.problem.ts b/src/015-essential-types-and-annotations/027-optional-property-types.problem.ts new file mode 100644 index 0000000..4cc7f78 --- /dev/null +++ b/src/015-essential-types-and-annotations/027-optional-property-types.problem.ts @@ -0,0 +1,29 @@ +import { expect, it } from "vitest"; + +const concatName = (user: { first: string; last: string }) => { + if (!user.last) { + return user.first; + } + return `${user.first} ${user.last}`; +}; + +it("should return the full name", () => { + const result = concatName({ + first: "John", + last: "Doe", + }); + + type test = Expect>; + + expect(result).toEqual("John Doe"); +}); + +it("should only return the first name if last name not provided", () => { + const result = concatName({ + first: "John", + }); + + type test = Expect>; + + expect(result).toEqual("John"); +}); diff --git a/src/015-essential-types-and-annotations/027-optional-property-types.solution.ts b/src/015-essential-types-and-annotations/027-optional-property-types.solution.ts new file mode 100644 index 0000000..64f8dff --- /dev/null +++ b/src/015-essential-types-and-annotations/027-optional-property-types.solution.ts @@ -0,0 +1,29 @@ +import { expect, it } from "vitest"; + +const concatName = (user: { first: string; last?: string }) => { + if (!user.last) { + return user.first; + } + return `${user.first} ${user.last}`; +}; + +it("should return the full name", () => { + const result = concatName({ + first: "John", + last: "Doe", + }); + + type test = Expect>; + + expect(result).toEqual("John Doe"); +}); + +it("should only return the first name if last name not provided", () => { + const result = concatName({ + first: "John", + }); + + type test = Expect>; + + expect(result).toEqual("John"); +}); diff --git a/src/015-essential-types-and-annotations/028-type-keyword.problem.ts b/src/015-essential-types-and-annotations/028-type-keyword.problem.ts new file mode 100644 index 0000000..4f89118 --- /dev/null +++ b/src/015-essential-types-and-annotations/028-type-keyword.problem.ts @@ -0,0 +1,34 @@ +import { expect, it } from "vitest"; + +const getRectangleArea = (rectangle: { width: number; height: number }) => { + return rectangle.width * rectangle.height; +}; + +const getRectanglePerimeter = (rectangle: { + width: number; + height: number; +}) => { + return 2 * (rectangle.width + rectangle.height); +}; + +it("should return the area of a rectangle", () => { + const result = getRectangleArea({ + width: 10, + height: 20, + }); + + type test = Expect>; + + expect(result).toEqual(200); +}); + +it("should return the perimeter of a rectangle", () => { + const result = getRectanglePerimeter({ + width: 10, + height: 20, + }); + + type test = Expect>; + + expect(result).toEqual(60); +}); diff --git a/src/015-essential-types-and-annotations/028-type-keyword.solution.1.ts b/src/015-essential-types-and-annotations/028-type-keyword.solution.1.ts new file mode 100644 index 0000000..d3176de --- /dev/null +++ b/src/015-essential-types-and-annotations/028-type-keyword.solution.1.ts @@ -0,0 +1,36 @@ +import { expect, it } from "vitest"; + +type Rectangle = { + width: number; + height: number; +}; + +const getRectangleArea = (rectangle: Rectangle) => { + return rectangle.width * rectangle.height; +}; + +const getRectanglePerimeter = (rectangle: Rectangle) => { + return 2 * (rectangle.width + rectangle.height); +}; + +it("should return the area of a rectangle", () => { + const result = getRectangleArea({ + width: 10, + height: 20, + }); + + type test = Expect>; + + expect(result).toEqual(200); +}); + +it("should return the perimeter of a rectangle", () => { + const result = getRectanglePerimeter({ + width: 10, + height: 20, + }); + + type test = Expect>; + + expect(result).toEqual(60); +}); diff --git a/src/015-essential-types-and-annotations/028-type-keyword.solution.2.ts b/src/015-essential-types-and-annotations/028-type-keyword.solution.2.ts new file mode 100644 index 0000000..d3d1791 --- /dev/null +++ b/src/015-essential-types-and-annotations/028-type-keyword.solution.2.ts @@ -0,0 +1,32 @@ +import { expect, it } from "vitest"; +import { Rectangle } from "./028-type-keyword.solution.3"; + +const getRectangleArea = (rectangle: Rectangle) => { + return rectangle.width * rectangle.height; +}; + +const getRectanglePerimeter = (rectangle: Rectangle) => { + return 2 * (rectangle.width + rectangle.height); +}; + +it("should return the area of a rectangle", () => { + const result = getRectangleArea({ + width: 10, + height: 20, + }); + + type test = Expect>; + + expect(result).toEqual(200); +}); + +it("should return the perimeter of a rectangle", () => { + const result = getRectanglePerimeter({ + width: 10, + height: 20, + }); + + type test = Expect>; + + expect(result).toEqual(60); +}); diff --git a/src/015-essential-types-and-annotations/028-type-keyword.solution.3.ts b/src/015-essential-types-and-annotations/028-type-keyword.solution.3.ts new file mode 100644 index 0000000..af9548f --- /dev/null +++ b/src/015-essential-types-and-annotations/028-type-keyword.solution.3.ts @@ -0,0 +1,4 @@ +export type Rectangle = { + width: number; + height: number; +}; diff --git a/src/015-essential-types-and-annotations/029-arrays.problem.ts b/src/015-essential-types-and-annotations/029-arrays.problem.ts new file mode 100644 index 0000000..578b7c2 --- /dev/null +++ b/src/015-essential-types-and-annotations/029-arrays.problem.ts @@ -0,0 +1,13 @@ +// How do we type 'items' in the ShoppingCart? +type ShoppingCart = { + userId: string; +}; + +const processCart = (cart: ShoppingCart) => { + // Do something with the cart in here +}; + +processCart({ + userId: "user123", + items: ["item1", "item2", "item3"], +}); diff --git a/src/015-essential-types-and-annotations/029-arrays.solution.1.ts b/src/015-essential-types-and-annotations/029-arrays.solution.1.ts new file mode 100644 index 0000000..fd51452 --- /dev/null +++ b/src/015-essential-types-and-annotations/029-arrays.solution.1.ts @@ -0,0 +1,14 @@ +// How do we type 'items' in the ShoppingCart? +type ShoppingCart = { + userId: string; + items: string[]; +}; + +const processCart = (cart: ShoppingCart) => { + // Do something with the cart in here +}; + +processCart({ + userId: "user123", + items: ["item1", "item2", "item3"], +}); diff --git a/src/015-essential-types-and-annotations/029-arrays.solution.2.ts b/src/015-essential-types-and-annotations/029-arrays.solution.2.ts new file mode 100644 index 0000000..92bacba --- /dev/null +++ b/src/015-essential-types-and-annotations/029-arrays.solution.2.ts @@ -0,0 +1,14 @@ +// How do we type 'items' in the ShoppingCart? +type ShoppingCart = { + userId: string; + items: Array; +}; + +const processCart = (cart: ShoppingCart) => { + // Do something with the cart in here +}; + +processCart({ + userId: "user123", + items: ["item1", "item2", "item3"], +}); diff --git a/src/015-essential-types-and-annotations/030-arrays-of-objects.problem.ts b/src/015-essential-types-and-annotations/030-arrays-of-objects.problem.ts new file mode 100644 index 0000000..91375d6 --- /dev/null +++ b/src/015-essential-types-and-annotations/030-arrays-of-objects.problem.ts @@ -0,0 +1,17 @@ +type Recipe = { + title: string; + instructions: string; +}; + +const processRecipe = (recipe: Recipe) => { + // Do something with the recipe in here +}; + +processRecipe({ + title: "Chocolate Chip Cookies", + ingredients: [ + { name: "Flour", quantity: "2 cups" }, + { name: "Sugar", quantity: "1 cup" }, + ], + instructions: "...", +}); diff --git a/src/015-essential-types-and-annotations/030-arrays-of-objects.solution.1.ts b/src/015-essential-types-and-annotations/030-arrays-of-objects.solution.1.ts new file mode 100644 index 0000000..1c8e68b --- /dev/null +++ b/src/015-essential-types-and-annotations/030-arrays-of-objects.solution.1.ts @@ -0,0 +1,23 @@ +type Ingredient = { + name: string; + quantity: string; +}; + +type Recipe = { + title: string; + instructions: string; + ingredients: Ingredient[]; +}; + +const processRecipe = (recipe: Recipe) => { + // Do something with the recipe in here +}; + +processRecipe({ + title: "Chocolate Chip Cookies", + ingredients: [ + { name: "Flour", quantity: "2 cups" }, + { name: "Sugar", quantity: "1 cup" }, + ], + instructions: "...", +}); diff --git a/src/015-essential-types-and-annotations/030-arrays-of-objects.solution.2.ts b/src/015-essential-types-and-annotations/030-arrays-of-objects.solution.2.ts new file mode 100644 index 0000000..527d397 --- /dev/null +++ b/src/015-essential-types-and-annotations/030-arrays-of-objects.solution.2.ts @@ -0,0 +1,23 @@ +type Ingredient = { + name: string; + quantity: string; +}; + +type Recipe = { + title: string; + instructions: string; + ingredients: Array; +}; + +const processRecipe = (recipe: Recipe) => { + // Do something with the recipe in here +}; + +processRecipe({ + title: "Chocolate Chip Cookies", + ingredients: [ + { name: "Flour", quantity: "2 cups" }, + { name: "Sugar", quantity: "1 cup" }, + ], + instructions: "...", +}); diff --git a/src/015-essential-types-and-annotations/030-arrays-of-objects.solution.3.ts b/src/015-essential-types-and-annotations/030-arrays-of-objects.solution.3.ts new file mode 100644 index 0000000..2091ae8 --- /dev/null +++ b/src/015-essential-types-and-annotations/030-arrays-of-objects.solution.3.ts @@ -0,0 +1,21 @@ +type Recipe = { + title: string; + instructions: string; + ingredients: { + name: string; + quantity: string; + }[]; +}; + +const processRecipe = (recipe: Recipe) => { + // Do something with the recipe in here +}; + +processRecipe({ + title: "Chocolate Chip Cookies", + ingredients: [ + { name: "Flour", quantity: "2 cups" }, + { name: "Sugar", quantity: "1 cup" }, + ], + instructions: "...", +}); diff --git a/src/015-essential-types-and-annotations/030-arrays-of-objects.solution.4.ts b/src/015-essential-types-and-annotations/030-arrays-of-objects.solution.4.ts new file mode 100644 index 0000000..656bc7d --- /dev/null +++ b/src/015-essential-types-and-annotations/030-arrays-of-objects.solution.4.ts @@ -0,0 +1,21 @@ +type Recipe = { + title: string; + instructions: string; + ingredients: Array<{ + name: string; + quantity: string; + }>; +}; + +const processRecipe = (recipe: Recipe) => { + // Do something with the recipe in here +}; + +processRecipe({ + title: "Chocolate Chip Cookies", + ingredients: [ + { name: "Flour", quantity: "2 cups" }, + { name: "Sugar", quantity: "1 cup" }, + ], + instructions: "...", +}); diff --git a/src/015-essential-types-and-annotations/031-rest-parameters-of-functions.problem.ts b/src/015-essential-types-and-annotations/031-rest-parameters-of-functions.problem.ts new file mode 100644 index 0000000..e0bc75d --- /dev/null +++ b/src/015-essential-types-and-annotations/031-rest-parameters-of-functions.problem.ts @@ -0,0 +1,12 @@ +import { expect, it } from "vitest"; + +export function concatenate(...strings): string { + return strings.join(""); +} + +it("should concatenate strings", () => { + const result = concatenate("Hello", " ", "World"); + expect(result).toEqual("Hello World"); + + type test = Expect>; +}); diff --git a/src/015-essential-types-and-annotations/031-rest-parameters-of-functions.solution.1.ts b/src/015-essential-types-and-annotations/031-rest-parameters-of-functions.solution.1.ts new file mode 100644 index 0000000..476545c --- /dev/null +++ b/src/015-essential-types-and-annotations/031-rest-parameters-of-functions.solution.1.ts @@ -0,0 +1,12 @@ +import { expect, it } from "vitest"; + +export function concatenate(...strings: string[]): string { + return strings.join(""); +} + +it("should concatenate strings", () => { + const result = concatenate("Hello", " ", "World"); + expect(result).toEqual("Hello World"); + + type test = Expect>; +}); diff --git a/src/015-essential-types-and-annotations/031-rest-parameters-of-functions.solution.2.ts b/src/015-essential-types-and-annotations/031-rest-parameters-of-functions.solution.2.ts new file mode 100644 index 0000000..9a92c84 --- /dev/null +++ b/src/015-essential-types-and-annotations/031-rest-parameters-of-functions.solution.2.ts @@ -0,0 +1,12 @@ +import { expect, it } from "vitest"; + +export function concatenate(...strings: Array): string { + return strings.join(""); +} + +it("should concatenate strings", () => { + const result = concatenate("Hello", " ", "World"); + expect(result).toEqual("Hello World"); + + type test = Expect>; +}); diff --git a/src/015-essential-types-and-annotations/032-tuples.problem.ts b/src/015-essential-types-and-annotations/032-tuples.problem.ts new file mode 100644 index 0000000..9da2732 --- /dev/null +++ b/src/015-essential-types-and-annotations/032-tuples.problem.ts @@ -0,0 +1,23 @@ +const setRange = (range: Array) => { + const x = range[0]; + const y = range[1]; + + // Do something with x and y in here + + // x and y should both be numbers! + type tests = [ + Expect>, + Expect>, + ]; +}; + +setRange([0, 10]); + +// @ts-expect-error string is not assignable to number +setRange([0, "10"]); + +// @ts-expect-error too few arguments +setRange([0]); + +// @ts-expect-error too many arguments +setRange([0, 10, 20]); diff --git a/src/015-essential-types-and-annotations/032-tuples.solution.1.ts b/src/015-essential-types-and-annotations/032-tuples.solution.1.ts new file mode 100644 index 0000000..716c056 --- /dev/null +++ b/src/015-essential-types-and-annotations/032-tuples.solution.1.ts @@ -0,0 +1,22 @@ +const setRange = (range: [number, number]) => { + const x = range[0]; + const y = range[1]; + + // Do something with x and y in here + + type tests = [ + Expect>, + Expect>, + ]; +}; + +setRange([0, 10]); + +// @ts-expect-error string is not assignable to number +setRange([0, "10"]); + +// @ts-expect-error too few arguments +setRange([0]); + +// @ts-expect-error too many arguments +setRange([0, 10, 20]); diff --git a/src/015-essential-types-and-annotations/032-tuples.solution.2.ts b/src/015-essential-types-and-annotations/032-tuples.solution.2.ts new file mode 100644 index 0000000..3ab827c --- /dev/null +++ b/src/015-essential-types-and-annotations/032-tuples.solution.2.ts @@ -0,0 +1,22 @@ +const setRange = (range: [x: number, y: number]) => { + const x = range[0]; + const y = range[1]; + + // Do something with x and y in here + + type tests = [ + Expect>, + Expect>, + ]; +}; + +setRange([0, 10]); + +// @ts-expect-error string is not assignable to number +setRange([0, "10"]); + +// @ts-expect-error too few arguments +setRange([0]); + +// @ts-expect-error too many arguments +setRange([0, 10, 20]); diff --git a/src/015-essential-types-and-annotations/033-optional-members-of-tuples.problem.ts b/src/015-essential-types-and-annotations/033-optional-members-of-tuples.problem.ts new file mode 100644 index 0000000..70b786d --- /dev/null +++ b/src/015-essential-types-and-annotations/033-optional-members-of-tuples.problem.ts @@ -0,0 +1 @@ +// TODO diff --git a/src/015-essential-types-and-annotations/033-optional-members-of-tuples.solution.ts b/src/015-essential-types-and-annotations/033-optional-members-of-tuples.solution.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/015-essential-types-and-annotations/034-pass-types-to-set.problem.ts b/src/015-essential-types-and-annotations/034-pass-types-to-set.problem.ts new file mode 100644 index 0000000..228d2eb --- /dev/null +++ b/src/015-essential-types-and-annotations/034-pass-types-to-set.problem.ts @@ -0,0 +1,10 @@ +const userIds = new Set(); + +userIds.add(1); +userIds.add(2); +userIds.add(3); + +// @ts-expect-error +userIds.add("123"); +// @ts-expect-error +userIds.add({ name: "Max" }); diff --git a/src/015-essential-types-and-annotations/034-pass-types-to-set.solution.1.ts b/src/015-essential-types-and-annotations/034-pass-types-to-set.solution.1.ts new file mode 100644 index 0000000..906d8a6 --- /dev/null +++ b/src/015-essential-types-and-annotations/034-pass-types-to-set.solution.1.ts @@ -0,0 +1,10 @@ +const userIds = new Set(); + +userIds.add(1); +userIds.add(2); +userIds.add(3); + +// @ts-expect-error +userIds.add("123"); +// @ts-expect-error +userIds.add({ name: "Max" }); diff --git a/src/015-essential-types-and-annotations/034-pass-types-to-set.solution.2.ts b/src/015-essential-types-and-annotations/034-pass-types-to-set.solution.2.ts new file mode 100644 index 0000000..85e70e6 --- /dev/null +++ b/src/015-essential-types-and-annotations/034-pass-types-to-set.solution.2.ts @@ -0,0 +1,10 @@ +const userIds: Set = new Set(); + +userIds.add(1); +userIds.add(2); +userIds.add(3); + +// @ts-expect-error +userIds.add("123"); +// @ts-expect-error +userIds.add({ name: "Max" }); diff --git a/src/015-essential-types-and-annotations/035-pass-types-to-map.problem.ts b/src/015-essential-types-and-annotations/035-pass-types-to-map.problem.ts new file mode 100644 index 0000000..0bd5785 --- /dev/null +++ b/src/015-essential-types-and-annotations/035-pass-types-to-map.problem.ts @@ -0,0 +1,10 @@ +const userMap = new Map(); + +userMap.set(1, { name: "Max", age: 30 }); +userMap.set(2, { name: "Manuel", age: 31 }); + +// @ts-expect-error +userMap.set("3", { name: "Anna", age: 29 }); + +// @ts-expect-error +userMap.set(3, "123"); diff --git a/src/015-essential-types-and-annotations/035-pass-types-to-map.solution.1.ts b/src/015-essential-types-and-annotations/035-pass-types-to-map.solution.1.ts new file mode 100644 index 0000000..f13f0b4 --- /dev/null +++ b/src/015-essential-types-and-annotations/035-pass-types-to-map.solution.1.ts @@ -0,0 +1,15 @@ +type User = { + name: string; + age: number; +}; + +const userMap = new Map(); + +userMap.set(1, { name: "Max", age: 30 }); +userMap.set(2, { name: "Manuel", age: 31 }); + +// @ts-expect-error +userMap.set("3", { name: "Anna", age: 29 }); + +// @ts-expect-error +userMap.set(3, "123"); diff --git a/src/015-essential-types-and-annotations/035-pass-types-to-map.solution.2.ts b/src/015-essential-types-and-annotations/035-pass-types-to-map.solution.2.ts new file mode 100644 index 0000000..2fbe32e --- /dev/null +++ b/src/015-essential-types-and-annotations/035-pass-types-to-map.solution.2.ts @@ -0,0 +1,10 @@ +const userMap = new Map(); + +userMap.set(1, { name: "Max", age: 30 }); +userMap.set(2, { name: "Manuel", age: 31 }); + +// @ts-expect-error +userMap.set("3", { name: "Anna", age: 29 }); + +// @ts-expect-error +userMap.set(3, "123"); diff --git a/src/015-essential-types-and-annotations/035-pass-types-to-map.solution.3.ts b/src/015-essential-types-and-annotations/035-pass-types-to-map.solution.3.ts new file mode 100644 index 0000000..271934f --- /dev/null +++ b/src/015-essential-types-and-annotations/035-pass-types-to-map.solution.3.ts @@ -0,0 +1,10 @@ +const userMap: Map = new Map(); + +userMap.set(1, { name: "Max", age: 30 }); +userMap.set(2, { name: "Manuel", age: 31 }); + +// @ts-expect-error +userMap.set("3", { name: "Anna", age: 29 }); + +// @ts-expect-error +userMap.set(3, "123"); diff --git a/src/015-essential-types-and-annotations/035-pass-types-to-map.solution.4.ts b/src/015-essential-types-and-annotations/035-pass-types-to-map.solution.4.ts new file mode 100644 index 0000000..3f32429 --- /dev/null +++ b/src/015-essential-types-and-annotations/035-pass-types-to-map.solution.4.ts @@ -0,0 +1,15 @@ +type User = { + name: string; + age: number; +}; + +const userMap: Map = new Map(); + +userMap.set(1, { name: "Max", age: 30 }); +userMap.set(2, { name: "Manuel", age: 31 }); + +// @ts-expect-error +userMap.set("3", { name: "Anna", age: 29 }); + +// @ts-expect-error +userMap.set(3, "123"); diff --git a/src/015-essential-types-and-annotations/036-json-parse-cant-receive-type-arguments.problem.ts b/src/015-essential-types-and-annotations/036-json-parse-cant-receive-type-arguments.problem.ts new file mode 100644 index 0000000..4616ffd --- /dev/null +++ b/src/015-essential-types-and-annotations/036-json-parse-cant-receive-type-arguments.problem.ts @@ -0,0 +1,23 @@ +import { expect, it } from "vitest"; + +const parsedData = JSON.parse<{ + name: string; + age: number; +}>('{"name": "Alice", "age": 30}'); + +type test = Expect< + Equal< + typeof parsedData, + { + name: string; + age: number; + } + > +>; + +it("Should be the correct shape", () => { + expect(parsedData).toEqual({ + name: "Alice", + age: 30, + }); +}); diff --git a/src/015-essential-types-and-annotations/036-json-parse-cant-receive-type-arguments.solution.ts b/src/015-essential-types-and-annotations/036-json-parse-cant-receive-type-arguments.solution.ts new file mode 100644 index 0000000..f6928cc --- /dev/null +++ b/src/015-essential-types-and-annotations/036-json-parse-cant-receive-type-arguments.solution.ts @@ -0,0 +1,23 @@ +import { expect, it } from "vitest"; + +const parsedData: { + name: string; + age: number; +} = JSON.parse('{"name": "Alice", "age": 30}'); + +type test = Expect< + Equal< + typeof parsedData, + { + name: string; + age: number; + } + > +>; + +it("Should be the correct shape", () => { + expect(parsedData).toEqual({ + name: "Alice", + age: 30, + }); +}); diff --git a/src/015-essential-types-and-annotations/037-type-async-functions.problem.ts b/src/015-essential-types-and-annotations/037-type-async-functions.problem.ts new file mode 100644 index 0000000..b80552b --- /dev/null +++ b/src/015-essential-types-and-annotations/037-type-async-functions.problem.ts @@ -0,0 +1,11 @@ +async function fetchData() { + const response = await fetch("https://api.example.com/data"); + const data = await response.json(); + return data; +} + +const example = async () => { + const data = await fetchData(); + + type test = Expect>; +}; diff --git a/src/015-essential-types-and-annotations/037-type-async-functions.solution.ts b/src/015-essential-types-and-annotations/037-type-async-functions.solution.ts new file mode 100644 index 0000000..1a32817 --- /dev/null +++ b/src/015-essential-types-and-annotations/037-type-async-functions.solution.ts @@ -0,0 +1,11 @@ +async function fetchData(): Promise { + const response = await fetch("https://api.example.com/data"); + const data = await response.json(); + return data; +} + +const example = async () => { + const data = await fetchData(); + + type test = Expect>; +}; diff --git a/src/helpers/type-utils.ts b/src/helpers/type-utils.ts new file mode 100644 index 0000000..8f9a01a --- /dev/null +++ b/src/helpers/type-utils.ts @@ -0,0 +1,47 @@ +export type Expect = T; +export type ExpectTrue = T; +export type ExpectFalse = T; +export type IsTrue = T; +export type IsFalse = T; + +export type Equal = (() => T extends X ? 1 : 2) extends < + T, +>() => T extends Y ? 1 : 2 + ? true + : false; +export type NotEqual = true extends Equal ? false : true; + +// https://stackoverflow.com/questions/49927523/disallow-call-with-any/49928360#49928360 +export type IsAny = 0 extends 1 & T ? true : false; +export type NotAny = true extends IsAny ? false : true; + +export type Debug = { [K in keyof T]: T[K] }; +export type MergeInsertions = T extends object + ? { [K in keyof T]: MergeInsertions } + : T; + +export type Alike = Equal, MergeInsertions>; + +/** + * Expect that one type is assignable to another. + * + * @example + * + * type tests = [ + * // Expect that `number` is assignable to `1`. + * Expect>, + * // Expect that `abc` is assignable to `string` + * Expect>, + * ]; + */ +export type Extends = EXPECTED extends VALUE ? true : false; +export type ExpectValidArgs< + FUNC extends (...args: any[]) => any, + ARGS extends any[], +> = ARGS extends Parameters ? true : false; + +export type UnionToIntersection = ( + U extends any ? (k: U) => void : never +) extends (k: infer I) => void + ? I + : never; diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..f482adb --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "target": "es2020", + "jsx": "react-jsx", + "module": "ES2022", + "moduleResolution": "node", + "noEmit": true, + "isolatedModules": true, + "moduleDetection": "force", + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "strict": true, + "skipLibCheck": true, + }, + "include": [ + "src" + ] +} \ No newline at end of file diff --git a/vite.config.ts b/vite.config.ts new file mode 100644 index 0000000..251dac0 --- /dev/null +++ b/vite.config.ts @@ -0,0 +1,13 @@ +import { defineConfig } from "vitest/config"; +import tsconfigPaths from "vite-tsconfig-paths"; +import path from "path"; + +export default defineConfig({ + test: { + include: ["src/**/*{problem,solution,explainer}*.{ts,tsx}"], + setupFiles: [path.resolve(__dirname, "scripts/setup.ts")], + passWithNoTests: true, + environment: "jsdom", + }, + plugins: [tsconfigPaths()], +});
+ Click on the Vite and TypeScript logos to learn more +