Skip to content

Connect, collaborate, and grow with a community of TypeScript developers

adds linting/formatting/checking/metadata-validation to challenges (#965)

Dimitri Mitropoulosc243b13842b2
diff --git a/.markdownlint.yaml b/.markdownlint.yaml
new file mode 100644
index 00000000..d7075984
--- /dev/null
+++ b/.markdownlint.yaml
@@ -0,0 +1,40 @@
+# see https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md for docs
+
+# Default state for all rules
+default: true
+
+# Path to configuration file to extend
+extends: null
+
+# MD004 - Unordered list style
+# We want to use dashes consistently everywhere
+MD004:
+ style: dash
+
+# MD013 - Line length
+# We do not want to artificially limit line length in a language like markdown because of the nature of the language's handling of whitespace. Line wrapping is just a fact of life in markdown and trying to impose the conventions of other languages on markdown is an impedance mismatch that leads to people thinking that whitespace in markdown is more representative of the rendered HTML than it really is.
+MD013: false
+
+# MD033 - Inline HTML
+MD033:
+ allowed_elements:
+ # there is no markdown equivalent for accordions
+ - details
+ - summary
+
+ # there is no other way to have multiline (syntax highlighted) code snippets
+ - table
+ - tbody
+ - td
+ - th
+ - thead
+ - tr
+
+# MD029 - Ordered list item prefix
+# Plain and simple, markdown parsers do not respect the numbering you use for ordered lists. It only leads to confusion and misconception to allow otherwise.
+MD029:
+ style: one
+
+# MD041 - First line in a file should be a top-level heading
+# The H1 is inserted separately for challenges
+MD041: false
diff --git a/.prettierignore b/.prettierignore
index 35a3979e..baaa062b 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -12,7 +12,7 @@ monaco-editor.d.ts
pnpm-lock.yaml
+!challenges/**/tests.ts
!apps/**
-challenges/**
!packages/**
!tooling/**
diff --git a/challenges/blank/prompt.md b/challenges/blank/prompt.md
index 82c2a7b8..f636ea4b 100644
--- a/challenges/blank/prompt.md
+++ b/challenges/blank/prompt.md
@@ -4,8 +4,8 @@ Explain: why this is important or useful knowledge
## How To Use XYZ
-What's the API of the type? What generics and in what order?
+What's the API of the type? What generics and in what order?
## Solving This Challenge
-Short and to-the-point. Should be _possible_ to skip everything above and just read this.
+Short and to-the-point. Should be _possible_ to skip everything above and just read this.
diff --git a/challenges/challenge-guidelines.md b/challenges/challenge-guidelines.md
index 850de031..e9ad7b92 100644
--- a/challenges/challenge-guidelines.md
+++ b/challenges/challenge-guidelines.md
@@ -1,4 +1,5 @@
<!-- omit in toc -->
+
# TypeHero Challenge Guidelines
- [Writing `prompt.md`](#writing-promptmd)
@@ -12,7 +13,7 @@
- [Don't Use `any`, Prefer `unknown`](#dont-use-any-prefer-unknown)
- [Avoid "Leading The Witness"](#avoid-leading-the-witness)
-This is a guide to help you write a challenge for TypeHero. Our goal is to keep the writing process straightforward while at the same time having some consistency. We've learned from experience that there are a few useful things to do to make it a more consistent (and less chaotic) feeling experience for our users. Some of these things are arbitrary design choices. That's ok. It's not about a "right way of doing things" but more "a cohesive experience for users".
+This is a guide to help you write a challenge for TypeHero. Our goal is to keep the writing process straightforward while at the same time having some consistency. We've learned from experience that there are a few useful things to do to make it a more consistent (and less chaotic) feeling experience for our users. Some of these things are arbitrary design choices. That's ok. It's not about a "right way of doing things" but more "a cohesive experience for users".
In general, if you find yourself having to pick between:
@@ -25,11 +26,11 @@ You should prefer more work for yourself at a 10,000:1 ratio.
### Keep It Fun
-Try to keep them fun and find widely relatable pop-culture references (without getting political or anything like that). Things like movies, video games, music, art, and anything a large number of people are likely to be familiar with. If you can work in some kind of interesting and lesser-known science fact or something that can also help the reader feel more engaged.
+Try to keep them fun and find widely relatable pop-culture references (without getting political or anything like that). Things like movies, video games, music, art, and anything a large number of people are likely to be familiar with. If you can work in some kind of interesting and lesser-known science fact or something that can also help the reader feel more engaged.
### Encourage Healthy Practices
-Avoid using `T` and `U` and `S` as generic parameters names. That doesn't mean there's never a place for them. Just avoid it if you can. For SUPER generic types (like `Pick`), it's fine to use `T`.
+Avoid using `T` and `U` and `S` as generic parameters names. That doesn't mean there's never a place for them. Just avoid it if you can. For SUPER generic types (like `Pick`), it's fine to use `T`.
## Writing `test.ts`
@@ -49,20 +50,14 @@ Make sure that the thing that's in the `Expect<Equal<` block _first_ is the thin
<td>
```ts
-type test_TheCoolestCarEverMade = Expect<Equal<
- TheCoolestCarEverMade,
- "Toyota Corolla"
->>;
+type test_TheCoolestCarEverMade = Expect<Equal<TheCoolestCarEverMade, 'Toyota Corolla'>>;
```
</td>
<td>
```ts
-type test_TheCoolestCarEverMade = Expect<Equal<
- "Toyota Corolla",
- TheCoolestCarEverMade
->>;
+type test_TheCoolestCarEverMade = Expect<Equal<'Toyota Corolla', TheCoolestCarEverMade>>;
```
</td>
@@ -109,7 +104,7 @@ type tests = [
</tbody>
</table>
-Why? Well what if you have a problem where only `MyThing3` is failing, if the test is written with a tuple type it's really difficult to debug the computed result of `MyThing3` that without taking `MyThing3` out and assigning it to an alias. That's a pretty bad experience for users. We can do that work for them upfront.
+Why? Well what if you have a problem where only `MyThing3` is failing, if the test is written with a tuple type it's really difficult to debug the computed result of `MyThing3` that without taking `MyThing3` out and assigning it to an alias. That's a pretty bad experience for users. We can do that work for them upfront.
Time to get comfortable with multicursor editing!
@@ -134,7 +129,7 @@ type test_MyThing_string = MyThing<string>;
### Don't Use `any`, Prefer `unknown`
-Unless your challenge is related to `any`, avoid using it. That means you should every helper type equal to `unknown` (not `any`).
+Unless your challenge is related to `any`, avoid using it. That means you should every helper type equal to `unknown` (not `any`).
<table>
<thead>
@@ -165,7 +160,7 @@ type Split = any;
### Avoid "Leading The Witness"
-One goal of TypeHero is to keep things as real-world as possible (except in the case of challenges that are literally just "for science" like JSON parsers, etc.). That means that you want to give people as much on-the-ground experience as possible. You want users to leave a challenge feeling like they actually learned or accomplished something (or both!).
+One goal of TypeHero is to keep things as real-world as possible (except in the case of challenges that are literally just "for science" like JSON parsers, etc.). That means that you want to give people as much on-the-ground experience as possible. You want users to leave a challenge feeling like they actually learned or accomplished something (or both!).
We want to encourage good behaviors that will carry users into their daily work.
diff --git a/challenges/default-generic-arguments/metadata.json b/challenges/default-generic-arguments/metadata.json
index 55372d09..193be736 100644
--- a/challenges/default-generic-arguments/metadata.json
+++ b/challenges/default-generic-arguments/metadata.json
@@ -3,5 +3,10 @@
"label": "Default Generic Arguments",
"description": "Default generic arguments allow you to optionally pass a generic argument.",
"difficulty": "beginner",
- "prerequisites": ["generic-type-arguments", "type-unions", "generic-constraints", "indexed-types"]
+ "prerequisites": [
+ "generic-type-arguments",
+ "type-unions",
+ "generic-type-constraints",
+ "indexed-types"
+ ]
}
diff --git a/challenges/default-generic-arguments/prompt.md b/challenges/default-generic-arguments/prompt.md
index 0ffdd650..eaae5e95 100644
--- a/challenges/default-generic-arguments/prompt.md
+++ b/challenges/default-generic-arguments/prompt.md
@@ -1,27 +1,27 @@
## Why Generic Arguments Need Defaults
-Technically speaking, no program absolutely requires default arguments. It's a convenience feature for the humans writing programs.
+Technically speaking, no program absolutely requires default arguments. It's a convenience feature for the humans writing programs.
-Sometimes you have a value in mind for an argument and you don't want to force users of your library to constantly provide the same value over and over again. That's the situation where default arguments come in handy.
+Sometimes you have a value in mind for an argument and you don't want to force users of your library to constantly provide the same value over and over again. That's the situation where default arguments come in handy.
## How To Create Default Type Arguments
### First: A Refresher On Function Defaults
-Let's take the case of a run-of-the-mill logging function. The logger always needs a message to log, but [log level](https://en.wikipedia.org/wiki/Syslog#Severity_level) might be something you want to be optional:
+Let's take the case of a run-of-the-mill logging function. The logger always needs a message to log, but [log level](https://en.wikipedia.org/wiki/Syslog#Severity_level) might be something you want to be optional:
```ts
type LogLevel = 'debug' | 'info' | 'notice' | 'warning' | 'error' | 'critical';
const log = (message: string, level: LogLevel = 'info') => {
// application logic
-}
+};
log('this has an explicit debug log level', 'debug');
log('this has an implicit info debug level');
```
-You can do exactly this kind of thing for generic types! This is yet another parallel between functions and generic types!
+You can do exactly this kind of thing for generic types! This is yet another parallel between functions and generic types!
### Default Generic Arguments
@@ -29,13 +29,13 @@ You can do exactly this kind of thing for generic types! This is yet another pa
type Log<Message, Level = 'info'> = {
message: Message;
level: Level;
-}
+};
-type ExplicitDebugLog = Log<"explicit debug", "debug">;
-type ImplicitInfo = Log<"implicit info">;
+type ExplicitDebugLog = Log<'explicit debug', 'debug'>;
+type ImplicitInfo = Log<'implicit info'>;
```
-Doesn't that look super similar!? A lot of the same rules apply in types that apply to function argument defaults. For example, you can't have a required argument following a default argument.
+Doesn't that look super similar!? A lot of the same rules apply in types that apply to function argument defaults. For example, you can't have a required argument following a default argument.
One notable exception is that there's no TypeScript value you can pass that will work like `undefined` does for JavaScript default arguments:
@@ -44,9 +44,9 @@ const greet = (name = 'Stranger') => {
console.log(`Hello ${name}!`);
};
-greet(); // Hello Stranger!
-greet(undefined); // Hello Stranger!
-greet("Mr. Monkey") // Hello Mr. Monkey!
+greet(); // Hello Stranger!
+greet(undefined); // Hello Stranger!
+greet('Mr. Monkey'); // Hello Mr. Monkey!
```
In TypeScript, even if you provide `never` or `unknown` or `any`, the value will be inserted instead of the default.
diff --git a/challenges/default-generic-arguments/solutions/1.ts b/challenges/default-generic-arguments/solutions/1.ts
index aa9e6231..973f3db8 100644
--- a/challenges/default-generic-arguments/solutions/1.ts
+++ b/challenges/default-generic-arguments/solutions/1.ts
@@ -5,4 +5,4 @@ type ApiRequest<Data, Method = 'GET'> = {
type TSConfig<Config extends { strict: boolean } = { strict: true }> = {
strict: Config['strict'];
-}
\ No newline at end of file
+};
diff --git a/challenges/generic-function-arguments/prompt.md b/challenges/generic-function-arguments/prompt.md
index a8163ae5..47429d4a 100644
--- a/challenges/generic-function-arguments/prompt.md
+++ b/challenges/generic-function-arguments/prompt.md
@@ -1,8 +1,8 @@
## Why Functions Need Generics
-One of the most common needs a TypeScript developer faces is the need to pass generic type arguments to functions. Then, those functions can use and manipulate those parameters.
+One of the most common needs a TypeScript developer faces is the need to pass generic type arguments to functions. Then, those functions can use and manipulate those parameters.
-In many situations, we don't need functions to be generic. The function might be written in such a way as to only work for one type of data (e.g. `string` or `number`). But, other times, we write functions where we want to pass the data type along from input to output.
+In many situations, we don't need functions to be generic. The function might be written in such a way as to only work for one type of data (e.g. `string` or `number`). But, other times, we write functions where we want to pass the data type along from input to output.
## Understanding Generic Syntax
@@ -24,7 +24,7 @@ const createRow = (
// how do we provide a type for `value`?
value: unknown,
-
+
disabled = false,
) => ({
label,
@@ -36,20 +36,16 @@ const createRow = (
Similarly to how we used the `<` and `>` for our `Row` interface, we place the `<` and `>` right before the parenthesis that start our function's arguments.
```ts
-const createRow = <T>(
- label: string,
- value: T,
- disabled = false,
-) => ({
+const createRow = <T,>(label: string, value: T, disabled = false) => ({
//...
-})
+});
```
-This is great! Now our `value` parameter has the right type!
+This is great! Now our `value` parameter has the right type!
### A Word On A Syntax Quirk
-You may see the `<T,>` syntax out in the wild. There's an unfortunate niggle with TypeScript's syntax that this is used to work around. Imagine being a parser and seeing `const createRow = <T>`. If you don't know what's coming next it could be ambiguous between these two things
+You may see the `<T,>` syntax out in the wild. There's an unfortunate niggle with TypeScript's syntax that this is used to work around. Imagine being a parser and seeing `const createRow = <T>`. If you don't know what's coming next it could be ambiguous between these two things
```ts
// Thing 1: Start of JSX
@@ -61,20 +57,20 @@ const createRow = <T>(someArg: T) => {
}
```
-Because of this ambiguity, we need to do something to _disambiguate_ these two situations to the TypeScript compiler. In the early days it used to be common to use `<T extends unknown>` (or `<T extends any>` in the days before `unknown` existed in TypeScript). But over time people realized there's a shorter way: `<T,>`. Because `,` is invalid in JSX, but valid in TypeScript to separate multiple arguments, it's sufficient to use this to disambiguate the two situations to the TypeScript compiler.
+Because of this ambiguity, we need to do something to _disambiguate_ these two situations to the TypeScript compiler. In the early days it used to be common to use `<T extends unknown>` (or `<T extends any>` in the days before `unknown` existed in TypeScript). But over time people realized there's a shorter way: `<T,>`. Because `,` is invalid in JSX, but valid in TypeScript to separate multiple arguments, it's sufficient to use this to disambiguate the two situations to the TypeScript compiler.
-All that to say, if you see this strange syntax know that it's not you, it's TypeScript being a bit funky. If this is confusing to you, just skip it and come back here and read it again when the day comes that you first see this syntax out in the wild.
+All that to say, if you see this strange syntax know that it's not you, it's TypeScript being a bit funky. If this is confusing to you, just skip it and come back here and read it again when the day comes that you first see this syntax out in the wild.
## Solving This Challenge
-This challenge asks you to make an `identity` function. This function does nothing and returns what it was passed with no modifications.
+This challenge asks you to make an `identity` function. This function does nothing and returns what it was passed with no modifications.
> Note: mathematicians love `identity` operations, so computer scientists use them too so we can seem cool to the mathematicians.
-The next function (`mapArray`) is admittedly pretty hard, but take it slow and think about it one step at a time. Ask yourself:
+The next function (`mapArray`) is admittedly pretty hard, but take it slow and think about it one step at a time. Ask yourself:
> what is the type of `arr`
-Then provide a generic argument as a type for `arr`. After you do that, think about what types you need to provide for `fn`.
+Then provide a generic argument as a type for `arr`. After you do that, think about what types you need to provide for `fn`.
-In this particular case, if you spend a few minutes with it don't be afraid to check out some solutions. This second example is here more to widen your perspective than anything else. It's good to wrestle with tough problems, even ones that are above your ability level.
+In this particular case, if you spend a few minutes with it don't be afraid to check out some solutions. This second example is here more to widen your perspective than anything else. It's good to wrestle with tough problems, even ones that are above your ability level.
diff --git a/challenges/generic-function-arguments/solutions/1.ts b/challenges/generic-function-arguments/solutions/1.ts
index e17bf26b..047474a4 100644
--- a/challenges/generic-function-arguments/solutions/1.ts
+++ b/challenges/generic-function-arguments/solutions/1.ts
@@ -1,3 +1,3 @@
-const identity = <T,>(input: T) => input;
+const identity = <T>(input: T) => input;
-const mapArray = <T, U>(arr: T[], fn: (item: T) => U) => arr.map(fn);
\ No newline at end of file
+const mapArray = <T, U>(arr: T[], fn: (item: T) => U) => arr.map(fn);
diff --git a/challenges/generic-function-arguments/user.ts b/challenges/generic-function-arguments/user.ts
index e9faf943..2a69953c 100644
--- a/challenges/generic-function-arguments/user.ts
+++ b/challenges/generic-function-arguments/user.ts
@@ -1,3 +1,3 @@
const identity = undefined;
-const mapArray = (arr, fn) => arr.map(fn);
\ No newline at end of file
+const mapArray = (arr, fn) => arr.map(fn);
diff --git a/challenges/generic-type-arguments/metadata.json b/challenges/generic-type-arguments/metadata.json
index 5b9760e4..a105e1e1 100644
--- a/challenges/generic-type-arguments/metadata.json
+++ b/challenges/generic-type-arguments/metadata.json
@@ -1,7 +1,7 @@
{
"id": "generic-type-arguments",
"label": "Generic Type Arguments",
- "description": "Generic types are like functions, and functions need inputs. That's what generic type arguments are.",
+ "description": "Generic types are like function arguments.",
"difficulty": "beginner",
"prerequisites": ["primitive-data-types", "type-aliases"]
}
diff --git a/challenges/generic-type-arguments/prompt.md b/challenges/generic-type-arguments/prompt.md
index 121dbac1..02fa8151 100644
--- a/challenges/generic-type-arguments/prompt.md
+++ b/challenges/generic-type-arguments/prompt.md
@@ -6,13 +6,13 @@ And just like functions often need arguments, we need some way to provide inputs
## How To Use Generic Arguments
-Instead of using parenthesis to pass arguments, with generics we use angled brackets: `<` and `>`.
+Instead of using parenthesis to pass arguments, with generics we use angled brackets: `<` and `>`.
Other than that, there are a lot of similarities between the two concepts.
-> You can even provide defaults for generic arguments! See the relevant challenge for [generic defaults](https://typehero.dev/challenge/default-generic-arguments).
+> You can even provide defaults for generic arguments! See the relevant challenge for [generic defaults](https://typehero.dev/challenge/default-generic-arguments).
-There are two separate situations when you'd use this syntax. One is when you're working strictly with types, and another is when you're doing more normal JavaScript-y stuff like with functions and constants.
+There are two separate situations when you'd use this syntax. One is when you're working strictly with types, and another is when you're doing more normal JavaScript-y stuff like with functions and constants.
### Universe 1: strictly in the type system
@@ -26,20 +26,20 @@ interface Row<T> {
}
```
-> Note: It's common (and acceptable) in situations like this where we _really don't know anything else_ about the Generic type parameter to use a single letter like `T`. But the moment you have multiple arguments (or more context for what this type will be) it's a good idea to use more descriptive names.
+> Note: It's common (and acceptable) in situations like this where we _really don't know anything else_ about the Generic type parameter to use a single letter like `T`. But the moment you have multiple arguments (or more context for what this type will be) it's a good idea to use more descriptive names.
What this syntax means is that we have a `Row` type, and we know it will have a `value` property, but the _specific type_ of that `value` property is not known until it's used.
-We could store `number`s in this `Row` type. If we did, it'd look like this:
+We could store `number`s in this `Row` type. If we did, it'd look like this:
```ts
-type NumberRow = Row<number>
+type NumberRow = Row<number>;
```
Or we could store `string`s:
```ts
-type StringRow = Row<string>
+type StringRow = Row<string>;
```
Because TypeScript is a structural type system, `Row<string>` is exactly equivalent (in every way) to if we had written this:
@@ -49,7 +49,7 @@ type StringRow = {
label: string;
value: string;
disabled: boolean;
-}
+};
```
But because we used a generic, we didn't have to type all that other stuff out every time.
@@ -63,33 +63,29 @@ type GroceryItem<Name, Price, InStock> = {
name: Name;
price: Price;
inStock: InStock;
-}
+};
```
Now you can change pass arguments to this type:
```ts
-type AvocadoToast = GroceryItem<
- 'Avocado Toast',
- 12.99,
- true
->
+type AvocadoToast = GroceryItem<'Avocado Toast', 12.99, true>;
```
This is exactly equal to if you had written:
```ts
type AvocadoToast = {
- name: 'Avocado Toast',
- price: 12.99,
- inStock: true
-}
+ name: 'Avocado Toast';
+ price: 12.99;
+ inStock: true;
+};
```
-> Note: you might notice that we're missing types for our type arguments! Right now there's nothing stopping us from sending in wrong values like `GroceryItem<number[], boolean, { over: 9000 }>`. We'll cover that in a future challenge on [generic type constraints](https://typehero.dev/challenge/generic-type-constraints).
+> Note: you might notice that we're missing types for our type arguments! Right now there's nothing stopping us from sending in wrong values like `GroceryItem<number[], boolean, { over: 9000 }>`. We'll cover that in a future challenge on [generic type constraints](https://typehero.dev/challenge/generic-type-constraints).
## Solving This Challenge
Similar to what we did with `AvocadoToast`, create a `CapreseSalad` type, and fill in the right values to make the tests pass.
-Then, create a new generic type for `GroceryStore`. Let the tests guide you regarding what the final type should look like and what the inputs should be.
+Then, create a new generic type for `GroceryStore`. Let the tests guide you regarding what the final type should look like and what the inputs should be.
diff --git a/challenges/generic-type-arguments/solutions/1.ts b/challenges/generic-type-arguments/solutions/1.ts
index 8f2abf82..13d20d5e 100644
--- a/challenges/generic-type-arguments/solutions/1.ts
+++ b/challenges/generic-type-arguments/solutions/1.ts
@@ -3,4 +3,4 @@ type CapreseSalad = GroceryItem<'Caprese Salad', 14.99, true>;
type GroceryStore<Name, City> = {
name: Name;
city: City;
-}
+};
diff --git a/challenges/generic-type-constraints/prompt.md b/challenges/generic-type-constraints/prompt.md
index 1bebf0fe..8ea64075 100644
--- a/challenges/generic-type-constraints/prompt.md
+++ b/challenges/generic-type-constraints/prompt.md
@@ -1,6 +1,6 @@
## The Problem Generic Type Constraints Solve
-Generics are an incredibly powerful tool in TypeScript. In a [previous challenge](https://typehero.dev/challenge/generic-type-arguments) where generic type arguments were introduced, we compared them to function arguments _but for types_.
+Generics are an incredibly powerful tool in TypeScript. In a [previous challenge](https://typehero.dev/challenge/generic-type-arguments) where generic type arguments were introduced, we compared them to function arguments _but for types_.
Consider the parallel of these two:
@@ -9,12 +9,12 @@ Consider the parallel of these two:
const drive = (carType: CarType) => {
// ^-------^ argument type constraint
// ....
-}
+};
// v-------v type parameter identifier
type Drive<CarType> = (carType: CarType) => {
// ....
-}
+};
```
Notice that there's no type constraint for the type parameter identifier.
@@ -22,7 +22,6 @@ Notice that there's no type constraint for the type parameter identifier.
That means that if we make a type like this:
```ts
-
type Row<T> = {
value: T;
label: string;
@@ -30,7 +29,7 @@ type Row<T> = {
};
```
-A consumer of this type could pass literally _anything_ for Row. All of these would be valid:
+A consumer of this type could pass literally _anything_ for Row. All of these would be valid:
```ts
type BooleanRow = Row<boolean>;
@@ -39,11 +38,11 @@ type RowRowRowStringRow = Row<Row<Row<Row<string>>>>;
type VoidFuncRow = Row<() => void>;
```
-But our Row component is likely to not be written in such a way to handle _literally anything_ being passed in as a type. We need to set some static boundaries on what kinds of things are passed in for `T` to `Row`.
+But our Row component is likely to not be written in such a way to handle _literally anything_ being passed in as a type. We need to set some static boundaries on what kinds of things are passed in for `T` to `Row`.
_We need types for our types._
-Well. That's kinda what Generic type constraints are: _type constraints for your parameterized types_!
+Well. That's kinda what Generic type constraints are: _type constraints for your parameterized types_!
It's a mouthful, but let's break it down step by step.
@@ -70,7 +69,7 @@ type Row<T extends RowConstraints> = {
value: T;
label: string;
orientation: 'vertical' | 'horizontal';
-}
+};
```
Now, if we try to use our `Row` generic with anything that doesn't match the above, TypeScript will report an error:
@@ -84,4 +83,4 @@ type StringArrayRow = Row<string[]>;
## Solving This Challenge
-Let the tests guide you on what specific constraints each type needs. By the end of this challenge, it should start to feel pretty robotic to add type constraints.
+Let the tests guide you on what specific constraints each type needs. By the end of this challenge, it should start to feel pretty robotic to add type constraints.
diff --git a/challenges/index-signatures/prompt.md b/challenges/index-signatures/prompt.md
index e7a076bf..aa071817 100644
--- a/challenges/index-signatures/prompt.md
+++ b/challenges/index-signatures/prompt.md
@@ -2,18 +2,20 @@
It's common in any language to make general purpose mappings of one type to another type.
-Look at this theoretical API response from your company. This is a `/followerCountByUser` endpoint and we pass in some user we're looking
+Look at this theoretical API response from your company. This is a `/followerCountByUser` endpoint and we pass in some user we're looking
```text
https://yourcompany.com/api/v1/followerCountByUser
```
+<!-- want trailing comma before comment -->
+<!-- prettier-ignore -->
```json
{
"info": {
"count": 9001,
"currentPage": 1,
- "pages": 22,
+ "pages": 22
},
"results": {
"user_ddb04d2e-21ff-4c68-9bdc-135c16c8e74a": 0,
@@ -27,15 +29,15 @@ https://yourcompany.com/api/v1/followerCountByUser
"user_eaa914df-4650-4c3b-9a04-723b5a63f297": 764,
"user_3199b7c6-7a8d-47eb-ae94-4e3457ad7760": 32,
// ... for many more rows in this page
- },
+ }
}
```
How would you write a type for your company's endpoint that returned data like this?
-In the real world you're going to have other things going on in types that might distract you. But don't get distracted by the pagination info. Let's zoom in on the `"results"` object.
+In the real world you're going to have other things going on in types that might distract you. But don't get distracted by the pagination info. Let's zoom in on the `"results"` object.
-`results` seems to be some kind of mapping of user ids to a follower count. It's an object where they keys are (more or less) random strings and the values are all numbers.
+`results` seems to be some kind of mapping of user ids to a follower count. It's an object where they keys are (more or less) random strings and the values are all numbers.
This turns out to be exactly the scenario for TypeScript index signatures!
@@ -46,7 +48,7 @@ In our case, here's how it looks:
```ts
type Results = {
[userId: string]: number;
-}
+};
```
Let's really break this down piece by piece:
@@ -55,17 +57,17 @@ Let's really break this down piece by piece:
- `Results` is the name we're giving to this type.
- `=` and `{` opens a new object type declaration.
- `[` is the TypeScript syntax that says "hey, we're going to start defining a property name now".
-- `userId` is completely arbitrary. It's just a name that we picked. It has no impact on the resulting type.
+- `userId` is completely arbitrary. It's just a name that we picked. It has no impact on the resulting type.
- `: string` this part indicates the type associated with this property\*.
- `]` ends the property name declaration.
- `: number` specifies that the type of values for this key are `number`.
- `}` signals the end of the object type declaration.
-> \* By the way: a massively misunderstood fact about JavaScript has to do with object keys. JavaScript object keys can only be strings or symbols. _THAT'S IT_. _period_. No other data types are possible to store as object keys.
+> \* By the way: a massively misunderstood fact about JavaScript has to do with object keys. JavaScript object keys can only be strings or symbols. _THAT'S IT_. _period_. No other data types are possible to store as object keys.
>
-> Part of the reason this is so commonly misunderstood because you can index an object with a number, or a boolean, and actually more, and it will often work, which gives the wrong impression. JavaScript will _coerce_ anything you store as an object key to a string.
+> Part of the reason this is so commonly misunderstood because you can index an object with a number, or a boolean, and actually more, and it will often work, which gives the wrong impression. JavaScript will _coerce_ anything you store as an object key to a string.
>
-> Unfortunately (and widely seen as a small mistake in TypeScript's design) TypeScript actually allows setting numeric keys (so if you replaced `: string` with `: number` in the type above). This can give you the impression that you can set object keys as numbers, when in fact you cannot.
+> Unfortunately (and widely seen as a small mistake in TypeScript's design) TypeScript actually allows setting numeric keys (so if you replaced `: string` with `: number` in the type above). This can give you the impression that you can set object keys as numbers, when in fact you cannot.
>
> Just watch out for this sneaky footgun in JavaScript.
@@ -76,16 +78,16 @@ type Info = {
count: number;
currentPage: number;
pages: number;
-}
+};
type FollowerCountByUserResults = {
[userId: string]: number;
-}
+};
type FollowerCountByUser = {
info: Info;
results: FollowerCountByUserResults;
-}
+};
```
Or, we could always inline everything (this works just fine with index signatures):
@@ -105,4 +107,4 @@ type FollowerCountByUser = {
## Solving This Challenge
-Take a look at the tests. You'll see some objects. Try to make types (using index signatures) that match those objects.
+Take a look at the tests. You'll see some objects. Try to make types (using index signatures) that match those objects.
diff --git a/challenges/index-signatures/solutions/1.ts b/challenges/index-signatures/solutions/1.ts
index e5b5aa8d..9452453d 100644
--- a/challenges/index-signatures/solutions/1.ts
+++ b/challenges/index-signatures/solutions/1.ts
@@ -1,10 +1,10 @@
type GroceryList = {
- [groceryItem: string]: number
+ [groceryItem: string]: number;
};
-type InnapropriateActionBySituation = {
+type InappropriateActionBySituation = {
[situation: string]: string[];
-}
+};
type CharactersById = {
[character: number]: {
@@ -12,5 +12,5 @@ type CharactersById = {
name: string;
status: string;
species: string;
- }
-}
\ No newline at end of file
+ };
+};
diff --git a/challenges/index-signatures/tests.ts b/challenges/index-signatures/tests.ts
index cd7372a8..4675f123 100644
--- a/challenges/index-signatures/tests.ts
+++ b/challenges/index-signatures/tests.ts
@@ -17,7 +17,7 @@ const groceryList: GroceryList = {
shouldAlsoError: true
};
-const innapropriateActionBySituation: InnapropriateActionBySituation = {
+const inappropriateActionBySituation: InappropriateActionBySituation = {
funeral: ['excessive laughter', 'bringing up personal achievements'],
medicalDiagnosis: ['jokes about American healthcare', 'WebMD', 'doomscrolling twitter instead of listening'],
leetcodeInterview: ['praise of CSS', 'citing XKCD comics by number from memory', 'use of emojis in whiteboard exercises followed by pontificating about your deep knowledge of UTF-16'],
diff --git a/challenges/index-signatures/user.ts b/challenges/index-signatures/user.ts
index 7b2c3f19..e4930bde 100644
--- a/challenges/index-signatures/user.ts
+++ b/challenges/index-signatures/user.ts
@@ -1,5 +1,5 @@
type GroceryList = unknown;
-type InnapropriateActionBySituation = unknown;
+type InappropriateActionBySituation = unknown;
-type CharactersById = unknown
\ No newline at end of file
+type CharactersById = unknown;
diff --git a/challenges/indexed-types/metadata.json b/challenges/indexed-types/metadata.json
index 27d788d6..a75f4358 100644
--- a/challenges/indexed-types/metadata.json
+++ b/challenges/indexed-types/metadata.json
@@ -1,7 +1,7 @@
{
"id": "indexed-types",
"label": "Indexed Types",
- "description": "Some types can be indexed (sorta like you would index an array or an object) to lookup a particular value.",
+ "description": "Some types can be indexed to lookup a particular value.",
"difficulty": "beginner",
- "prerequisites": ["primitive-types", "type-unions", "keyof", "literal-types"]
+ "prerequisites": ["primitive-data-types", "type-unions", "keyof", "literal-types"]
}
diff --git a/challenges/indexed-types/prompt.md b/challenges/indexed-types/prompt.md
index db4c02c8..19ca58c2 100644
--- a/challenges/indexed-types/prompt.md
+++ b/challenges/indexed-types/prompt.md
@@ -1,6 +1,6 @@
## What Indexed Types Are For
-Indexed types allow you to look inside other types. They're a useful tool when accessing array/tuple values, object values, and more! We're going to see much more complicated uses for indexed types, but for this challenge, let's just focus on the basics.
+Indexed types allow you to look inside other types. They're a useful tool when accessing array/tuple values, object values, and more! We're going to see much more complicated uses for indexed types, but for this challenge, let's just focus on the basics.
## How To Use Index Types
@@ -9,19 +9,19 @@ Indexed types allow you to look inside other types. They're a useful tool when
Just how you can use a number index to grab an element of an array:
```ts
-const cars = ["Bugatti", "Ferarri", "Lambo", "Porsche", "Toyota Corolla"];
+const cars = ['Bugatti', 'Ferarri', 'Lambo', 'Porsche', 'Toyota Corolla'];
const secondCar = cars[1];
```
You can do exactly the same thing with types;
```ts
-type Cars = ["Bugatti", "Ferarri", "Lambo", "Porsche", "Toyota Corolla"];
+type Cars = ['Bugatti', 'Ferarri', 'Lambo', 'Porsche', 'Toyota Corolla'];
type SecondCar = Cars[1];
// ^?
```
-> Notice that TypeScript evaluates the literal value `"Ferarri"`. It's not just `string`!
+> Notice that TypeScript evaluates the literal value `"Ferarri"`. It's not just `string`!
### Objects
@@ -29,31 +29,31 @@ Same for objects:
```ts
const donations = {
- "Bono": 15_000_000,
- "J.K. Rowling": 160_000_000,
- "Taylor Swift": 45_000_000,
- "Elton John": 600_000_000,
- "Angelina Jolie and Brad Pitt": 100_000_000,
-}
-const eltonDonations = donations["Elton John"];
+ Bono: 15_000_000,
+ 'J.K. Rowling': 160_000_000,
+ 'Taylor Swift': 45_000_000,
+ 'Elton John': 600_000_000,
+ 'Angelina Jolie and Brad Pitt': 100_000_000,
+};
+const eltonDonations = donations['Elton John'];
```
and (you guessed it!) object types:
```ts
type Donations = {
- "Bono": 15_000_000,
- "J.K. Rowling": 160_000_000,
- "Taylor Swift": 45_000_000,
- "Elton John": 600_000_000,
- "Angelina Jolie and Brad Pitt": 100_000_000,
+ Bono: 15_000_000;
+ 'J.K. Rowling': 160_000_000;
+ 'Taylor Swift': 45_000_000;
+ 'Elton John': 600_000_000;
+ 'Angelina Jolie and Brad Pitt': 100_000_000;
};
-type EltonDonations = Donations["Elton John"];
+type EltonDonations = Donations['Elton John'];
// ^?
```
-> Notice that TypeScript evaluates the literal value for Elton's donations. It's not just `number`!
+> Notice that TypeScript evaluates the literal value for Elton's donations. It's not just `number`!
### Strings
@@ -62,24 +62,24 @@ If you're getting excited that you might be able to do the same for strings, I h
The following is valid TypeScript
```ts
-const question = "Have the humans delivered their ultimate cup of coffee?";
+const question = 'Have the humans delivered their ultimate cup of coffee?';
const firstCharacter = question[0];
```
And this is also valid:
```ts
-type Question = "Have the humans delivered their ultimate cup of coffee?";
+type Question = 'Have the humans delivered their ultimate cup of coffee?';
type FirstCharacter = Question[0];
// ^?
```
-But perhaps you notice a difference from the above examples that returned a literal type. Here, with TypeScript strings, the resultant value is just `string` and not a more specific constant value like `H` (the first character of the string type). That means that while it's not a syntax error to index a string type, it also effectively _does nothing_ since it will always result in `string`.
+But perhaps you notice a difference from the above examples that returned a literal type. Here, with TypeScript strings, the resultant value is just `string` and not a more specific constant value like `H` (the first character of the string type). That means that while it's not a syntax error to index a string type, it also effectively _does nothing_ since it will always result in `string`.
-In fact, TypeScript doesn't even check (or care about) the specific value you index with. You'll always get back string:
+In fact, TypeScript doesn't even check (or care about) the specific value you index with. You'll always get back string:
```ts
-type Empty = "";
+type Empty = '';
type IndexEmpty = Empty[9001];
// ^?
```
@@ -90,7 +90,7 @@ Not a big deal or anything, but just something to be aware of in case you were e
## Solving This Challenge
-This one should feel easy to pass. Let the tests guide you.
+This one should feel easy to pass. Let the tests guide you.
And, remember, while this challenge is pretty straightforward to complete, we're soon going to be doing some pretty advanced work that relies heavily on indexed types.
diff --git a/challenges/indexed-types/solutions/1.ts b/challenges/indexed-types/solutions/1.ts
index 0a69189e..a02e7634 100644
--- a/challenges/indexed-types/solutions/1.ts
+++ b/challenges/indexed-types/solutions/1.ts
@@ -1,2 +1,2 @@
type TheCoolestCarEverMade = Cars[5];
-type TruckDriverBonusGiver = Donations["Taylor Swift"];
+type TruckDriverBonusGiver = Donations['Taylor Swift'];
diff --git a/challenges/keyof/prompt.md b/challenges/keyof/prompt.md
index 7d2ccfb8..2687c5c3 100644
--- a/challenges/keyof/prompt.md
+++ b/challenges/keyof/prompt.md
@@ -2,8 +2,10 @@
The `keyof` operator is used for extracting a union representing the keys (also known as "properties") of a type.
-Let's say your audiophile cousin is asking you to digitize her casette tape collection (she's convinced they "sound better" on casette... yawn..). So you make an object where you count up how many albums you have for each artist:
+Let's say your audiophile cousin is asking you to digitize her casette tape collection (she's convinced they "sound better" on casette... yawn..). So you make an object where you count up how many albums you have for each artist:
+<!-- no need to complicate the reading of this by some having quotes and some not (which is made especially distracting by the fact that they show up syntax highlighted different colors) -->
+<!-- prettier-ignore -->
```ts
const casettesByArtist = {
'Alanis Morissette': 2,
@@ -17,7 +19,7 @@ const casettesByArtist = {
'Green Day': 2,
'Pearl Jam': 5,
'Metallica': 5,
- 'Guns N\' Roses': 2,
+ "Guns N' Roses": 2,
'U2': 3,
'Aerosmith': 4,
'R.E.M.': 4,
@@ -32,6 +34,8 @@ But what if you wanted to extract all these keys as a type?
We could always re-type all of them in a literal union:
+<!-- want to not raise distracting syntax questions about starting with `|` and also keep it on fewer lines in the prompt window -->
+<!-- prettier-ignore -->
```ts
type Artists = 'Alanis Morissette' | 'Mariah Carey' | 'Nirvana'
| 'Oasis' | 'Radiohead' | 'No Doubt'| 'Backstreet Boys'
@@ -40,7 +44,7 @@ type Artists = 'Alanis Morissette' | 'Mariah Carey' | 'Nirvana'
| 'The Smashing Pumpkins' | 'Britney Spears' | 'Whitney Houston'
```
-But that's pretty Rough. You _certainly_ would not want to retype all those artist names. What if you forget one? What if you misspell one?
+But that's pretty Rough. You _certainly_ would not want to retype all those artist names. What if you forget one? What if you misspell one?
Great news: you can use `keyof` to solve this problem!
@@ -54,7 +58,7 @@ In our case we _don't have_ a type to start working with (because we), so we cre
type CasettesByArtist = typeof casettesByArtist;
```
-Then we can use `keyof` on our new type to get an alias that represents the union of all keys in our `casettestByArtist` object.
+Then we can use `keyof` on our new type to get an alias that represents the union of all keys in our `casettesByArtist` object.
```ts
type Artists = keyof CasettesByArtist;
@@ -64,7 +68,7 @@ type Artists = keyof CasettesByArtist;
The result of `keyof` is always a union.
-> Even if there are 0 or 1 objects, it doesn't hurt to think of the result as a union. If there are no elements in the result will be `never` (which is the empty set in "Set theory" terminology). When there's only one key than the resulting type will be a single primitive or literal type.
+> Even if there are 0 or 1 objects, it doesn't hurt to think of the result as a union. If there are no elements in the result will be `never` (which is the empty set in "Set theory" terminology). When there's only one key than the resulting type will be a single primitive or literal type.
## Solving This Challenge
diff --git a/challenges/literal-types/prompt.md b/challenges/literal-types/prompt.md
index c356892f..ef0171d9 100644
--- a/challenges/literal-types/prompt.md
+++ b/challenges/literal-types/prompt.md
@@ -1,16 +1,16 @@
## The Problem Literal Types Solve
-JavaScript, like most programming languages has a concept of [primitive data types](https://typehero.dev/challenge/primitive-data-types). Primitive data types are things like `string`, `boolean`, `number`, and `object`.
+JavaScript, like most programming languages has a concept of [primitive data types](https://typehero.dev/challenge/primitive-data-types). Primitive data types are things like `string`, `boolean`, `number`, and `object`.
> side note: in JavaScript, arrays and functions are actually objects, but that's a topic for another time :)
-But TypeScript isn't _like_ most programming languages. It's better. It takes takes things to the next level by introducing _literal_ data types.
+But TypeScript isn't _like_ most programming languages. It's better. It takes takes things to the next level by introducing _literal_ data types.
-You can think of literal data types as being an infinite set of subsets of their primitive counterparts. For example
+You can think of literal data types as being an infinite set of subsets of their primitive counterparts. For example
### A Practical Use-Case
-Literal types can be used to create a rainbow of possibilities. In this case, we've defined a type `RainbowColor` that can only have one of the types specified in a union of literal strings.
+Literal types can be used to create a rainbow of possibilities. In this case, we've defined a type `RainbowColor` that can only have one of the types specified in a union of literal strings.
```ts
type RainbowColor = 'red' | 'orange' | 'yellow' | 'green' | 'blue' | 'indigo' | 'violet';
@@ -31,11 +31,11 @@ pickColor('purple');
// ^?
```
-> By the way. Did you know that purple's not in the rainbow because [there's no "purple" wavelength of light](https://www.youtube.com/results?search_query=purple+is+not+a+color). It's true. Our brains fabricate it for us to make sense of paradoxical visual inputs.
+> By the way. Did you know that purple's not in the rainbow because [there's no "purple" wavelength of light](https://www.youtube.com/results?search_query=purple+is+not+a+color). It's true. Our brains fabricate it for us to make sense of paradoxical visual inputs.
### Literal Types For Returns
-But wait! There's A LOT more! Literal types are useful for returns, too. Check out this code:
+But wait! There's A LOT more! Literal types are useful for returns, too. Check out this code:
```ts
type Day = 'Monday' | 'Tuesday' | 'Wednesday' | 'Thursday' | 'Friday' | 'Saturday' | 'Sunday';
@@ -48,17 +48,17 @@ const isItPartyTime = (day: Day) => {
return 'definitely party time';
default:
- return 'prolly lay low for now'
+ return 'prolly lay low for now';
}
-}
+};
isItPartyTime('Monday');
// ^?
```
-> /* the above example assumes a 4 day workweek since 4 day workweeks are observed to increase employee productivity.
+> /\* the above example assumes a 4 day workweek since 4 day workweeks are observed to increase employee productivity.
-The _return type_ for this function is _also_ a literal type union. Notice that you didn't have to specify the return type anywhere. It just _works_ this way in TypeScript. Nice.
+The _return type_ for this function is _also_ a literal type union. Notice that you didn't have to specify the return type anywhere. It just _works_ this way in TypeScript. Nice.
### Why Are Type Literals Even Necessary?
@@ -66,7 +66,7 @@ If you're thinking to yourself:
> Why are type literals even necessary?  Lots of languages don't have anything like this and they seem to get along just fine with primitive types like `string` and `number` and `boolean`.
-The TLDR; is: once you pair type unions with literals, you can start _discriminating_ inputs based on one particular literal instance of a type versus another, TypeScript suddenly becomes capable of doing some pretty amazing static analysis on your code that you could never do if all you had were primitive types. If that's unpalatable to you, there's always COBOL. Try that out instead maybe?
+The TLDR; is: once you pair type unions with literals, you can start _discriminating_ inputs based on one particular literal instance of a type versus another, TypeScript suddenly becomes capable of doing some pretty amazing static analysis on your code that you could never do if all you had were primitive types. If that's unpalatable to you, there's always COBOL. Try that out instead maybe?
## Solving this Challenge
diff --git a/challenges/literal-types/solutions/1.ts b/challenges/literal-types/solutions/1.ts
index ff27ab03..077d61fb 100644
--- a/challenges/literal-types/solutions/1.ts
+++ b/challenges/literal-types/solutions/1.ts
@@ -2,9 +2,9 @@ type LiteralString = 'chocolate chips';
type LiteralTrue = true;
type LiteralNumbers = 1 | 2 | 3 | 4 | 5 | 6;
type LiteralObject = {
- name: 'chocolate chips',
- inStock: true,
- kilograms: 5,
+ name: 'chocolate chips';
+ inStock: true;
+ kilograms: 5;
};
type LiteralFunction = (a: number, b: number) => number;
@@ -13,9 +13,9 @@ const literalTrue = true;
const literalNumber = Math.random() > 0.5 ? 1 : 2;
const almostPi = 3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651328230664709384460955058223172535940812848111745028410270193852110555964462294895493038196442881097566593344612847564823378678316527120190914564856692346034861045432664821339360726024914127372458700660631558817488152092096282925409171536436789259036001133053054882046652138414695194151160943305727036575959195309218611738193261179310511854807446237996274956735188575272489122793818301194912983367336244065664308602139494639522473719070217986094370277053921717629317675238467481846766940513200056812714526356082778577134275778960917363717872146844090122495343014654958537105079227968925892354201995611212902196086403441815981362977477130996051870721134999999837297804995105973173281609631859502445945534690830264252230825334468503526193118817101000313783875288658753320838142061717766914730359825349042875546873115956286388235378759375195778185778053217122680661300192787661119590921642019891337;
const literalObject = {
- origin: "far across the omniverse",
- command: "fetch",
+ origin: 'far across the omniverse',
+ command: 'fetch',
item: "the universe's ultimate cup of coffee (black)",
- time: "five Earth minutes"
+ time: 'five Earth minutes',
};
const literalFunction = (a: number, b: string) => a || b;
diff --git a/challenges/literal-types/user.ts b/challenges/literal-types/user.ts
index 8cd76b25..afea8393 100644
--- a/challenges/literal-types/user.ts
+++ b/challenges/literal-types/user.ts
@@ -8,4 +8,4 @@ const literalString = undefined;
const literalTrue = undefined;
const literalNumber = Math.random() > 0.5 ? undefined : undefined;
const literalObject = {};
-const literalFunction = () => {}
\ No newline at end of file
+const literalFunction = () => {};
diff --git a/challenges/mapped-object-types/prompt.md b/challenges/mapped-object-types/prompt.md
index 831eea27..1ea14cff 100644
--- a/challenges/mapped-object-types/prompt.md
+++ b/challenges/mapped-object-types/prompt.md
@@ -1,12 +1,12 @@
## Why Mapped Object Types Are Useful
-In mathematics, a "map" is a function that associates each element in one set with an element. That's where we get this usage of the word in computer science.
+In mathematics, a "map" is a function that associates each element in one set with an element. That's where we get this usage of the word in computer science.
-Mapped types are one of the most potent and versatile features of TypeScript. They enable you to create new types by transforming the properties of existing types, making your code more robust, flexible, and maintainable. As you further your journey with TypeScript, you're going to find yourself reaching for mapped types pretty often to solve daily-living type (and data) transformation tasks.
+Mapped types are one of the most potent and versatile features of TypeScript. They enable you to create new types by transforming the properties of existing types, making your code more robust, flexible, and maintainable. As you further your journey with TypeScript, you're going to find yourself reaching for mapped types pretty often to solve daily-living type (and data) transformation tasks.
## How To Use Mapped Types
-It might seem a little strange, but let's start with a mapped type that _does nothing_. Here's how it looks:
+It might seem a little strange, but let's start with a mapped type that _does nothing_. Here's how it looks:
```ts
type MoviesByGenre = {
@@ -36,18 +36,18 @@ Let's talk about what this syntax does, piece by piece:
- `= {` begins our type
- `[` starts an index signature
- `K` is the name we're giving to the value in this index signature.
- - `K` (for "Key") and `P` (for "Property") are very common names to use in this particular situation. While it's not often the best choice, you'll see it around (including in TypeScript's own builtin types), so it's worthwhile to just roll with it if you see it. If you can make a more descriptive name, you should.
-- `in` is a special TypeScript operator for mapping. It tells TypeScript that `K` represents a single item in a larger set of things defined on the right side of the `in` operator.
+ - `K` (for "Key") and `P` (for "Property") are very common names to use in this particular situation. While it's not often the best choice, you'll see it around (including in TypeScript's own builtin types), so it's worthwhile to just roll with it if you see it. If you can make a more descriptive name, you should.
+- `in` is a special TypeScript operator for mapping. It tells TypeScript that `K` represents a single item in a larger set of things defined on the right side of the `in` operator.
- `keyof T` is a union of all the keys of the `T` object.
-- `: T[K]` is regular type indexing. The value, `K`, can here be thought of as a singular property in a sort of loop. We take some individual value of `K` (which are keys of `T`) and then index `T` with that key, thereby producing a value that matches the value in `T` for that `K`.
+- `: T[K]` is regular type indexing. The value, `K`, can here be thought of as a singular property in a sort of loop. We take some individual value of `K` (which are keys of `T`) and then index `T` with that key, thereby producing a value that matches the value in `T` for that `K`.
- `;` it might at first seem strange, but if you take a step back, this is just a `property: value` line in an object type, so we end it with a semicolon like we normally would with types in TypeScript.
- `};` ends the type declaration.
-But, all this _stuff_ but we end up with a type that's literally identical to what we started with. In the above code, `Example` and `MoviesByGenre` are literally the same type to TypeScript because TypeScript is a structural type system. THey have all the same properties and values, so to TypeScript they are basically aliases at this point (aliases with extra steps, granted!).
+But, all this _stuff_ but we end up with a type that's literally identical to what we started with. In the above code, `Example` and `MoviesByGenre` are literally the same type to TypeScript because TypeScript is a structural type system. THey have all the same properties and values, so to TypeScript they are basically aliases at this point (aliases with extra steps, granted!).
### Resetting all values
-So let's do the simplest possible thing to change our `Example` type. Let's just change one little part of the above:
+So let's do the simplest possible thing to change our `Example` type. Let's just change one little part of the above:
```diff
type MovieInfoByGenre<T> = {
@@ -76,4 +76,4 @@ type Example = {
## Solving This Challenge
-The tests define a slightly more complicated remapping, but you actually have all the tools you need to make it work. Just take it slow and follow the syntax piece by piece if you get lost.
+The tests define a slightly more complicated remapping, but you actually have all the tools you need to make it work. Just take it slow and follow the syntax piece by piece if you get lost.
diff --git a/challenges/mapped-object-types/user.ts b/challenges/mapped-object-types/user.ts
index a52b159c..2594b6c8 100644
--- a/challenges/mapped-object-types/user.ts
+++ b/challenges/mapped-object-types/user.ts
@@ -1 +1 @@
-type MovieInfoByGenre = unknown
+type MovieInfoByGenre = unknown;
diff --git a/challenges/notes to dimitri.md b/challenges/notes to dimitri
similarity index 100%
rename from challenges/notes to dimitri.md
rename to challenges/notes to dimitri
diff --git a/challenges/pick/prompt.md b/challenges/pick/prompt.md
index 40dd0457..befb7c24 100644
--- a/challenges/pick/prompt.md
+++ b/challenges/pick/prompt.md
@@ -17,14 +17,14 @@ interface Pokemon {
}
```
-That's a lot of properties! But what if you have a function that only needs two properties from this type:
+That's a lot of properties! But what if you have a function that only needs two properties from this type:
```ts
const pickYourPokemon = (pokemon: Pokemon) => {
const { type, name } = pokemon;
- return `You picked the ${type}-type Pokemon ${name}!`
-}
+ return `You picked the ${type}-type Pokemon ${name}!`;
+};
```
You would call your function like this:
@@ -33,10 +33,9 @@ You would call your function like this:
const pikachu = {
name: 'Pikachu',
type: 'Electric',
-}
-console.log(pickYourPokemon(pikachu))
+};
+console.log(pickYourPokemon(pikachu));
// ^------ oops! There's a type-error here!
-
```
But now there's a type error because you didn't provide the full `Pokemon` type.
@@ -61,27 +60,27 @@ You might also be tempted to separate all the things you need into two positiona
+ const pickYourPokemon = (name: string, type: string) => {
```
-But there's a much better way! You can use the `Pick` utility type! You simply to provide the keys you want from the original type and it produces a new type for your specific use-case.
+But there's a much better way! You can use the `Pick` utility type! You simply to provide the keys you want from the original type and it produces a new type for your specific use-case.
This is great news because it means:
-1. Any time something in the base `Pokemon` type changes, it'll also be updated in your function. If you hardcoded, they'd fall out of sync.
+1. Any time something in the base `Pokemon` type changes, it'll also be updated in your function. If you hardcoded, they'd fall out of sync.
1. You don't have to repeat yourself!
1. You are communicating to future readers that your function is using a subset of the types from `Pokemon`.
1. Consumers of your `pickYourPokemon` function don't need to provide data the function doesn't even use (that would be annoying, wouldn't it?).
## How To Use `Pick`
-`Pick` is a special _built-in_ TypeScript type that's always in scope, so you don't need to import it from anywhere. You can just use it as-if it was already imported.
+`Pick` is a special _built-in_ TypeScript type that's always in scope, so you don't need to import it from anywhere. You can just use it as-if it was already imported.
To use it, you must provide `Pick` with two things:
1. The type original object you're basing your new type on (in our example, `Pokemon`)
1. A _union_ of strings representing all the keys you wish to pick from the base type (in our case, `name` and `type`).
-Let's talk about the `union` part real quick. TypeScript has a special syntax that represent an unordered unique set of values. You separate them with the "pipe" character.
+Let's talk about the `union` part real quick. TypeScript has a special syntax that represent an unordered unique set of values. You separate them with the "pipe" character.
-In our example, we have a union of strings. It looks like this:
+In our example, we have a union of strings. It looks like this:
```ts
type BasicPokemonKeys = 'name' | 'type';
@@ -90,15 +89,15 @@ type BasicPokemonKeys = 'name' | 'type';
Then we can use this type with `Pick` and our `Pokemon` base type:
```ts
-type BasicPokemonInfo = Pick<Pokemon, BasicPokemonKeys>
+type BasicPokemonInfo = Pick<Pokemon, BasicPokemonKeys>;
```
We're almost there!
-A few things about your options fo the syntax here. We made the `BasicPokemonKeys` helper type, but we didn't have to. We can declare the type _inline_ like this:
+A few things about your options fo the syntax here. We made the `BasicPokemonKeys` helper type, but we didn't have to. We can declare the type _inline_ like this:
```ts
-type BasicPokemonInfo = Pick<Pokemon, 'name' | 'type'>
+type BasicPokemonInfo = Pick<Pokemon, 'name' | 'type'>;
```
Then, we can use this new type in our function definition:
@@ -108,7 +107,7 @@ Then, we can use this new type in our function definition:
+ const pickYourPokemon = (pokemon: BasicPokemonInfo) => {
```
-Just like we inlined the keys, we could also inline the entire `Pick` itself. In fact, this style is what you'll most often see in TypeScript codebases in a situation like this. Here's a full example:
+Just like we inlined the keys, we could also inline the entire `Pick` itself. In fact, this style is what you'll most often see in TypeScript codebases in a situation like this. Here's a full example:
```ts
interface Pokemon {
@@ -122,19 +121,17 @@ interface Pokemon {
resilience: string;
}
-const pickYourPokemon = (
- pokemon: Pick<Pokemon, 'name' | 'type'>
-) => {
+const pickYourPokemon = (pokemon: Pick<Pokemon, 'name' | 'type'>) => {
const { type, name } = pokemon;
- return `You picked the ${type}-type Pokemon ${name}!`
-}
+ return `You picked the ${type}-type Pokemon ${name}!`;
+};
const pikachu = {
name: 'Pikachu',
type: 'Electric',
-}
+};
-console.log(pickYourPokemon(pikachu))
+console.log(pickYourPokemon(pikachu));
// => `You picked the Electric-type Pokemon Pikachu!
```
@@ -142,8 +139,8 @@ console.log(pickYourPokemon(pikachu))
In this challenge you'll implement the `Pick` type described above.
-Remember that the TypeScript `keyof` operator is the way of getting the keys of a type. So `keyof Pokemon` will result in a union of strings that looks like `'name' | 'type' ...... | 'weakness' | 'resilience'`.
+Remember that the TypeScript `keyof` operator is the way of getting the keys of a type. So `keyof Pokemon` will result in a union of strings that looks like `'name' | 'type' ...... | 'weakness' | 'resilience'`.
By convention, the first argument of the `Pick` type is the base type (so, `Pokemon` in our example) and the second generic argument is a union of strings of that are valid keys of the base type.
-Another convention is the use of `T` and `K` as parameter types. For extremely generic types like `Pick` this is normal. As your types become more specific you should try to make more descriptive names.
+Another convention is the use of `T` and `K` as parameter types. For extremely generic types like `Pick` this is normal. As your types become more specific you should try to make more descriptive names.
diff --git a/challenges/pick/solutions/1.ts b/challenges/pick/solutions/1.ts
index 3b3456d8..fb92be39 100644
--- a/challenges/pick/solutions/1.ts
+++ b/challenges/pick/solutions/1.ts
@@ -1,6 +1,6 @@
/**
* From T, pick a set of properties whose keys are in the union K
- *
+ *
* This solution is verbatim from the ES5 builtins.
*/
type Pick<T, K extends keyof T> = {
diff --git a/challenges/primitive-data-types/prompt.md b/challenges/primitive-data-types/prompt.md
index 69f81ddf..09f2fa41 100644
--- a/challenges/primitive-data-types/prompt.md
+++ b/challenges/primitive-data-types/prompt.md
@@ -2,27 +2,27 @@
Because the ability to create primitive types are the foundational idea behind TypeScript, asking what problem primitive types solve is more like asking "what problem does _TypeScript_ solve".
-TypeScript is like a really really smart spellchecker. It helps you work faster when you're at your best, but it also saves you from misspelling words when you're under stress at 3am the night before a big term paper is due.
+TypeScript is like a really really smart spellchecker. It helps you work faster when you're at your best, but it also saves you from misspelling words when you're under stress at 3am the night before a big term paper is due.
-Think about it for a second: spellcheckers work because there are encoded with rules about the vocabulary and syntax of English. Similarly, TypeScript has advanced knowledge about the vocabulary and syntax of JavaScript. But TypeScript can do even better because you can specify the type of your data. That allows TypeScript to make even better judgement calls about whether something you're trying to do is likely to be a bug (or not).
+Think about it for a second: spellcheckers work because there are encoded with rules about the vocabulary and syntax of English. Similarly, TypeScript has advanced knowledge about the vocabulary and syntax of JavaScript. But TypeScript can do even better because you can specify the type of your data. That allows TypeScript to make even better judgement calls about whether something you're trying to do is likely to be a bug (or not).
## What Does "Primitive" mean in this context?
-And speaking of words and language, the usage of "primitive" in this sense is a bit of technical jargon. If you look up "primitive" in the dictionary you'll find that the top definition is:
+And speaking of words and language, the usage of "primitive" in this sense is a bit of technical jargon. If you look up "primitive" in the dictionary you'll find that the top definition is:
-> 1. relating to, denoting, or preserving the character of an early stage in the evolutionary or historical development of something.
+> 1: relating to, denoting, or preserving the character of an early stage in the evolutionary or historical development of something.
-So basically, it means "ancient" or "undeveloped"? huh???
+So basically, it means "ancient" or "undeveloped"? huh???
-Nope. That's actually not the way the word is used in this context. If you keep reading down the list, you'll find a less common definition:
+Nope. That's actually not the way the word is used in this context. If you keep reading down the list, you'll find a less common definition:
-> 3. not developed or derived from anything else.
+> 3: not developed or derived from anything else.
-Ahhh. Yes. That one makes more sense. That's what primitive types are. They are the base units of information from which everything else is derived.
+Ahhh. Yes. That one makes more sense. That's what primitive types are. They are the base units of information from which everything else is derived.
Indeed, all TypeScript types are derived from primitive types (aside from a few very very rare exceptions most people are not even aware of\*).
-> \* if you're incredibly curious: a very short list of exceptions that the compiler has special knowledge of do exist. E.g. usages `intrinsic` keyword and `ThisType`.
+> \* if you're incredibly curious: a very short list of exceptions that the compiler has special knowledge of do exist. E.g. usages `intrinsic` keyword and `ThisType`.
## What Do Primitive Types Look Like
@@ -30,13 +30,13 @@ It's a bit confusing at first, but primitive types are defined with _lowercase_
Here are some of the basic types:
-- `number`: since JavaScript only has one real number type (IEEE-754 64-bit floating point numbers), so too does TypeScript then not define types like `short` and `long` or types like `uint32` or `uint16` like you might be used to in other languages. Instead we just use `number` for everything.
+- `number`: since JavaScript only has one real number type (IEEE-754 64-bit floating point numbers), so too does TypeScript then not define types like `short` and `long` or types like `uint32` or `uint16` like you might be used to in other languages. Instead we just use `number` for everything.
- `string`: a variable length set of characters (UTF-16).
-- `boolean`: Don't let this next sentence keep you up at night if it sounds strange, but just keep in the back of your mind that boolean isn't actually a primitive type deep down in TypeScript internals. It's a little different from string or number since it is just an alias for the union of `true` and `false`. It doesn't _widen_ like `number` and `string` do, and thus is slightly inconsistent. If that didn't make sense to you right now don't worry. This problem almost never surfaces in a way that's problematic so you're clear to just consider it a primitive type. Also, the way TypeScript handles `boolean` is actually the more correct way to model things from a ["Set theory"](https://en.wikipedia.org/wiki/Set_theory) standpoint.
-- `null`: this is technically really a "literal type", but it refers to the type of the `null` value in JavaScript. Since `null` is special, it get's its own type.
-- `undefined`: same as with `null`. This is a specific JavaScript value and it has a corresponding TypeScript type.
+- `boolean`: Don't let this next sentence keep you up at night if it sounds strange, but just keep in the back of your mind that boolean isn't actually a primitive type deep down in TypeScript internals. It's a little different from string or number since it is just an alias for the union of `true` and `false`. It doesn't _widen_ like `number` and `string` do, and thus is slightly inconsistent. If that didn't make sense to you right now don't worry. This problem almost never surfaces in a way that's problematic so you're clear to just consider it a primitive type. Also, the way TypeScript handles `boolean` is actually the more correct way to model things from a ["Set theory"](https://en.wikipedia.org/wiki/Set_theory) standpoint.
+- `null`: this is technically really a "literal type", but it refers to the type of the `null` value in JavaScript. Since `null` is special, it get's its own type.
+- `undefined`: same as with `null`. This is a specific JavaScript value and it has a corresponding TypeScript type.
-Then we've got some more advanced ones that you don't need to worry about quite yet. But here they are as a teaser:
+Then we've got some more advanced ones that you don't need to worry about quite yet. But here they are as a teaser:
- `symbol`
- `bigint`
@@ -45,10 +45,10 @@ Then we've got some more advanced ones that you don't need to worry about quite
- `unknown`
- `any`
-And while we're in the weeds for a moment, you should be aware that _capitalized_ variants of these things do actually exist: `Number`, `String`, `Boolean`, `Symbol`, `Object`. But these refer to something quite different (i.e. JavaScript global objects) and should virtually never be used as types.
+And while we're in the weeds for a moment, you should be aware that _capitalized_ variants of these things do actually exist: `Number`, `String`, `Boolean`, `Symbol`, `Object`. But these refer to something quite different (i.e. JavaScript global objects) and should virtually never be used as types.
## Solving This Challenge
To solve this challenge: add primitive types to the code until the errors go away.
-You might need to add type annotations to variables (declared with `const` or types of arguments). You might also need to add missing properties to objects.
+You might need to add type annotations to variables (declared with `const` or types of arguments). You might also need to add missing properties to objects.
diff --git a/challenges/primitive-data-types/solutions/1.ts b/challenges/primitive-data-types/solutions/1.ts
index b00ee01c..e0fd97e9 100644
--- a/challenges/primitive-data-types/solutions/1.ts
+++ b/challenges/primitive-data-types/solutions/1.ts
@@ -1,7 +1,4 @@
-const playSong = (
- name: string,
- year: number,
-) => {
+const playSong = (name: string, year: number) => {
return `${name} was released in the year ${year}`;
};
@@ -15,11 +12,7 @@ interface Musician {
deceased: boolean;
}
-const musicianInfo = ({
- name,
- age,
- deceased,
-}: Musician) => {
+const musicianInfo = ({ name, age, deceased }: Musician) => {
return `${name}, age ${age}${deceased ? ' (deceased)' : ''}`;
};
diff --git a/challenges/primitive-data-types/user.ts b/challenges/primitive-data-types/user.ts
index e2e7c4c8..f1ade208 100644
--- a/challenges/primitive-data-types/user.ts
+++ b/challenges/primitive-data-types/user.ts
@@ -1,7 +1,4 @@
-const playSong = (
- name,
- year,
-) => {
+const playSong = (name, year) => {
return `${name} was released in the year ${year}`;
};
@@ -15,11 +12,7 @@ interface Musician {
deceased: boolean;
}
-const musicianInfo = ({
- name,
- age,
- deceased,
-}: Musician) => {
+const musicianInfo = ({ name, age, deceased }: Musician) => {
return `${name}, age ${age}${deceased ? ' (deceased)' : ''}`;
};
diff --git a/challenges/type-aliases/prompt.md b/challenges/type-aliases/prompt.md
index 39453d0b..0752cef1 100644
--- a/challenges/type-aliases/prompt.md
+++ b/challenges/type-aliases/prompt.md
@@ -12,7 +12,7 @@ Let's envision that code in TypeScript and see how type aliases can help.
*/
const landSpacecraft = (distance: number) => {
// ... do fancy math here
-}
+};
```
In this case, wouldn't it be nice if we could use a type that's more specific than `number`?
@@ -27,14 +27,14 @@ type Meters = number;
const landSpacecraft = (distance: Meters) => {
// ... do fancy math here
-}
+};
```
-Cool, huh? Now we can do fun stuff like adding JSDoc (as you see above) that way people will see more information about how this type is intended to be _used_ in programs.
+Cool, huh? Now we can do fun stuff like adding JSDoc (as you see above) that way people will see more information about how this type is intended to be _used_ in programs.
## The Biggest Source Of Bugs With Aliases
-But unfortunately, this particular TypeScript types design might not be a great choice for such a job because the actual behavior may be surprising to you. You might expect the following code to have a type error, but it doesn't:
+But unfortunately, this particular TypeScript types design might not be a great choice for such a job because the actual behavior may be surprising to you. You might expect the following code to have a type error, but it doesn't:
```ts
/** In */
@@ -45,9 +45,9 @@ const targetDistance: Miles = 100;
landSpacecraft(targetDistance);
```
-Wait! What's going on? `landSpacecraft` specifically asked for `Meters` but clearly we passed in `Miles` here. Our spacecraft is going to crash!
+Wait! What's going on? `landSpacecraft` specifically asked for `Meters` but clearly we passed in `Miles` here. Our spacecraft is going to crash!
-Be careful that you understand that TypeScript is a _structural type system_. One result of this is that primitive types are _not_ something known as ["opaque types"](https://en.wikipedia.org/wiki/Opaque_data_type). To TypeScript, everything that's an alias for a number is still a number.
+Be careful that you understand that TypeScript is a _structural type system_. One result of this is that primitive types are _not_ something known as ["opaque types"](https://en.wikipedia.org/wiki/Opaque_data_type). To TypeScript, everything that's an alias for a number is still a number.
There actually is a idiomatic TypeScript way to design this, but it requires another concept covered in another challenge on [type unions](https://typehero.dev/challenge/type-unions).
@@ -61,11 +61,11 @@ type MyAlias = number;
It's most common (but not mandatory) to use a semicolon to end a type declaration.
-Don't worry if this TypeScript feature seems underwhelming. It's not that useful _on its own_, but rather it becomes very powerful when you pair it with other concepts (like type unions, literal types, intersections, and more).
+Don't worry if this TypeScript feature seems underwhelming. It's not that useful _on its own_, but rather it becomes very powerful when you pair it with other concepts (like type unions, literal types, intersections, and more).
### p.s. Don't Overuse Aliases
-One little tip: be careful not to _over use_ type aliases. A very common mistake beginners make is to create aliases for arrays of things:
+One little tip: be careful not to _over use_ type aliases. A very common mistake beginners make is to create aliases for arrays of things:
```ts
export interface Row {
@@ -81,7 +81,7 @@ But, ask yourself:
> can I just import `Row` and specify `Row[]` when needed?
-If the answer is yes, then you should probably not make an alias for `Rows`. This is beneficial because you're probably going to want to work with the `Row` type _anyway_ in the same file. It's also a bit easier to read and understand.
+If the answer is yes, then you should probably not make an alias for `Rows`. This is beneficial because you're probably going to want to work with the `Row` type _anyway_ in the same file. It's also a bit easier to read and understand.
## Solving This Challenge
diff --git a/challenges/type-aliases/solutions/1.ts b/challenges/type-aliases/solutions/1.ts
index 5b1fe8d5..906d34b4 100644
--- a/challenges/type-aliases/solutions/1.ts
+++ b/challenges/type-aliases/solutions/1.ts
@@ -6,6 +6,6 @@ type IsOperational = boolean;
type Kilograms = number;
interface Payload {
- name: Name,
- mass: Kilograms
-}
\ No newline at end of file
+ name: Name;
+ mass: Kilograms;
+}
diff --git a/challenges/type-unions/prompt.md b/challenges/type-unions/prompt.md
index 29ecf8f6..ad4e5357 100644
--- a/challenges/type-unions/prompt.md
+++ b/challenges/type-unions/prompt.md
@@ -1,6 +1,6 @@
## What Problem Type Unions Solve
-In a previous example for `type-aliases` we saw a problem. We were writing code for a space shuttle and we wanted to make sure that we can't accidentally use the wrong units type.
+In a previous example for `type-aliases` we saw a problem. We were writing code for a space shuttle and we wanted to make sure that we can't accidentally use the wrong units type.
```ts
type Meters = number;
@@ -18,7 +18,7 @@ const distanceInMiles: Miles = 1242;
landSpacecraft(distanceInMiles);
```
-What do we do? We have some places in our code that take a unit of `miles` and some places in our code that take a unit of `meters` and we want to be sure we _NEVER_ mix the two up since it could mean literally destroying the entire spacecraft if we do (even once).
+What do we do? We have some places in our code that take a unit of `miles` and some places in our code that take a unit of `meters` and we want to be sure we _NEVER_ mix the two up since it could mean literally destroying the entire spacecraft if we do (even once).
We can use unions!
@@ -60,22 +60,22 @@ const landSpacecraft = (distance: Distance) => {
value: distance.unit === 'miles' ? distance.value / 1609.34 : distance.value,
};
// ... rest of our code
-}
+};
```
## Properties of Unions
-Unions are a very deep topic, actually. The three things you need to know right now are:
+Unions are a very deep topic, actually. The three things you need to know right now are:
1. unions are unordered
- a. and if you implement hacks to try to depend on the order your tests will break across different TypeScript versions
+ a. and if you implement hacks to try to depend on the order your tests will break across different TypeScript versions
1. the items in a union are unique
- a. so doing `1 | 1 | 2 | 3` is the same as `1 | 2 | 3`
+ a. so doing `1 | 1 | 2 | 3` is the same as `1 | 2 | 3`
1. the `never` type is an empty union
- a. we'll learn more about `never` [later on](todo-never)
+ a. we'll learn more about `never` [later on](todo-never)
## Solving This Challenge
-We just started integrating with a new API from a vendor that only publishes data in `feet`. Now we need to update a function `getDistanceInMeters` accordingly.
+We just started integrating with a new API from a vendor that only publishes data in `feet`. Now we need to update a function `getDistanceInMeters` accordingly.
Then, context switch to a completely different task (realistic, isn't it??) and update the `Position` type's union members until there are no more errors in the test.
diff --git a/challenges/type-unions/solutions/1.ts b/challenges/type-unions/solutions/1.ts
index 1f84e918..cacb6646 100644
--- a/challenges/type-unions/solutions/1.ts
+++ b/challenges/type-unions/solutions/1.ts
@@ -12,7 +12,7 @@ type Miles = {
type Feet = {
unit: 'feet';
value: number;
-}
+};
type Distance = Meters | Miles | Feet;
@@ -27,5 +27,4 @@ type Position =
| 'right'
| 'bottomLeft'
| 'bottom'
- | 'bottomRight'
-;
+ | 'bottomRight';
diff --git a/challenges/typeof/prompt.md b/challenges/typeof/prompt.md
index a8232783..6680b663 100644
--- a/challenges/typeof/prompt.md
+++ b/challenges/typeof/prompt.md
@@ -1,18 +1,18 @@
## `typeof`: A Bridge Between Worlds
-Have we said thank you, yet, for taking these TypeHero challenges? Well... THANK YOU!
+Have we said thank you, yet, for taking these TypeHero challenges? Well... THANK YOU!
-You're doing yourself a great service by improve your knowledge of TypeScript. As you dig deeper, on your quest to become a TypeScript wizard, you're going to start noticing that there are almost two worlds. The "JavaScript" world and the "types" world.
+You're doing yourself a great service by improve your knowledge of TypeScript. As you dig deeper, on your quest to become a TypeScript wizard, you're going to start noticing that there are almost two worlds. The "JavaScript" world and the "types" world.
-| | JavaScript world | types world |
-| - | - | - |
-| variables | `const`, `let`, function arguments | [type aliases](https://typehero.dev/challenge/type-aliases), [default generic arguments](https://typehero.dev/challenge/default-generic-arguments) |
-| operations | `for` loops, `while` loops, recursion, higher-order functions | recursion, higher-order types |
-| runtime artifacts | ✅ | ❌ |
-| time of error | runtime | compile time |
-| constructs | statements, expressions | expressions |
+| | JavaScript world | types world |
+| ----------------- | ------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
+| variables | `const`, `let`, function arguments | [type aliases](https://typehero.dev/challenge/type-aliases), [default generic arguments](https://typehero.dev/challenge/default-generic-arguments) |
+| operations | `for` loops, `while` loops, recursion, higher-order functions | recursion, higher-order types |
+| runtime artifacts | ✅ | ❌ |
+| time of error | runtime | compile time |
+| constructs | statements, expressions | expressions |
-Perhaps you see a problem this divide might cause. What happens if you have information in JavaScript that you want to bring over to TypeScript?
+Perhaps you see a problem this divide might cause. What happens if you have information in JavaScript that you want to bring over to TypeScript?
<!-- TODO: mermaid diagram https://github.blog/2022-02-14-include-diagrams-markdown-files-mermaid with a remark plugin in `markdown.tsx` -->
@@ -29,7 +29,7 @@ JavaScript ==> `typeof` ==> TypeScript
### `typeof` in JavaScript
-You might be familiar with `typeof` as a JavaScript operator. It returns a string indicating the type of a JavaScript value.
+You might be familiar with `typeof` as a JavaScript operator. It returns a string indicating the type of a JavaScript value.
```ts
console.log(typeof "Euler's Number");
@@ -39,7 +39,7 @@ console.log(typeof 2.7182);
// -> logs the string `'number'`
```
-But that's JavaScript. The `typeof` actually also exists in TypeScript!
+But that's JavaScript. The `typeof` actually also exists in TypeScript!
### `typeof` in TypeScript
@@ -52,8 +52,8 @@ const value = 2.7182;
// we can use `typeof` for type aliases
type Value = typeof value;
-// or we can use it inline for new
interface FamousNumbers {
+ // or we can use it inline
label: typeof name;
value: Value;
}
@@ -66,7 +66,7 @@ type Count = typeof count;
### `typeof` Is Most Useful For Complex Types
-TypeScript keyword that you put before a JavaScript _identifier_ like a variable name. Let's say you have this function in your codebase:
+TypeScript keyword that you put before a JavaScript _identifier_ like a variable name. Let's say you have this function in your codebase:
```ts
const createPoint = (x: number, y: number) => ({ x, y });
@@ -78,14 +78,14 @@ You can use `typeof` to _extract_ the type of this JavaScript function and bring
// JavaScript stuff
// |
// v----------
-type CreatePoint = typeof createPoint
+type CreatePoint = typeof createPoint;
//^----------------------
//|
//|TypeScript stuff
```
-Later, you're going to learn about ways to then do more operations on types. We're going to be extracting keys of objects <!-- todo [keys of objects](https://typehero.dev/challenge/object-keys)-->, and creating new types for return types <!-- todo [return types](https://typehero.dev/challenge/return-types) --> and parameters <!-- todo [parameters](https://typehero.dev/challenge/parameters) --> of functions.
+Later, you're going to learn about ways to then do more operations on types. We're going to be extracting keys of objects <!-- todo [keys of objects](https://typehero.dev/challenge/object-keys)-->, and creating new types for return types <!-- todo [return types](https://typehero.dev/challenge/return-types) --> and parameters <!-- todo [parameters](https://typehero.dev/challenge/parameters) --> of functions.
## Solving This Challenge
-The tests provide you some data. Try to make all the tests pass by using that data combined with the `typeof` operator.
+The tests provide you some data. Try to make all the tests pass by using that data combined with the `typeof` operator.
diff --git a/challenges/typeof/tests.ts b/challenges/typeof/tests.ts
index 28a0feda..6cb9c027 100644
--- a/challenges/typeof/tests.ts
+++ b/challenges/typeof/tests.ts
@@ -50,7 +50,7 @@ const d3ChartConfig = {
tickSize: 5,
},
bar: {
- fill: 'steelblue',
+ fill: 'rebeccapurple',
},
};
diff --git a/challenges/validate.ts b/challenges/validate.ts
new file mode 100644
index 00000000..32ba746d
--- /dev/null
+++ b/challenges/validate.ts
@@ -0,0 +1,92 @@
+import { readdirSync, readFileSync, statSync } from 'fs';
+import { join } from 'path';
+import Ajv from 'ajv';
+
+/*
+this script does a few checks:
+
+1. makes sure each directory has a metadata.json file
+1. runs JSONSchema validation on all metadata.json files
+1. make sure the directory name matches the id contained within it's metadata.json file
+ - (bonus: this ensures that the id is unique since you can't have two sibling directories with the same name)
+1. make sure the prerequisites are valid ids
+1. make sure the prerequisites don't contain the current
+*/
+
+const getChallengeIds = (dir: string) => {
+ return readdirSync(dir)
+ .filter((entry) => entry !== 'blank')
+ .filter((entry) => statSync(join(dir, entry)).isDirectory())
+ .filter((entry) => statSync(join(dir, entry, 'metadata.json')).isFile());
+};
+
+const getMetadata = (dir: string, id: string) => {
+ const metadataFilePath = join(dir, id, 'metadata.json');
+ const metadataFile = readFileSync(metadataFilePath).toString();
+ const metadata = JSON.parse(metadataFile) as {
+ id: string;
+ prerequisites: string[];
+ };
+ return {
+ metadataFilePath,
+ metadata,
+ };
+};
+
+const validateMetadataSchema = (dir: string, ids: string[]) => {
+ const ajv = new Ajv();
+
+ const schema = JSON.parse(readFileSync(join(dir, 'metadata.schema.json')).toString());
+
+ const validate = ajv.compile(schema);
+
+ ids.forEach((id) => {
+ const { metadata, metadataFilePath } = getMetadata(dir, id);
+
+ if (!validate(metadata)) {
+ console.error(
+ `[ERROR]: the challenge metadata file ${metadataFilePath} is invalid: ${JSON.stringify(
+ validate.errors,
+ )}`,
+ );
+ }
+ });
+};
+
+const ensureChallengeIdMatchesDirectory = (dir: string) => (id: string) => {
+ const { metadataFilePath, metadata } = getMetadata(dir, id);
+
+ if (id !== metadata.id) {
+ console.error(
+ `[ERROR]: the challenge metadata file ${metadataFilePath} contains the id "${metadata.id}", but this does not match the directory ("${id}").`,
+ );
+ }
+};
+
+const validatePrerequisiteIds = (dir: string) => (id: string, _: number, ids: string[]) => {
+ const { metadataFilePath, metadata } = getMetadata(dir, id);
+
+ metadata.prerequisites.forEach((prerequisite) => {
+ if (!ids.includes(prerequisite)) {
+ console.error(
+ `[ERROR] the challenge metadata file ${metadataFilePath} contains a prerequisite "${prerequisite}" which does not match any known challenge id.`,
+ );
+ }
+
+ if (prerequisite === id) {
+ console.error(
+ `[ERROR] the challenge metadata file ${metadataFilePath} contains a prerequisite "${prerequisite}" which matches the challenge id "${id}"`,
+ );
+ }
+ });
+};
+
+const validateMetadataFiles = () => {
+ const challengeIds = getChallengeIds(__dirname);
+
+ validateMetadataSchema(__dirname, challengeIds);
+ challengeIds.forEach(ensureChallengeIdMatchesDirectory(__dirname));
+ challengeIds.forEach(validatePrerequisiteIds(__dirname));
+};
+
+validateMetadataFiles();
diff --git a/cspell.json b/cspell.json
new file mode 100644
index 00000000..97c53363
--- /dev/null
+++ b/cspell.json
@@ -0,0 +1,42 @@
+{
+ "words": [
+ "Aerosmith",
+ "Ahhh",
+ "Alanis",
+ "Asgardian",
+ "Caprese",
+ "Chewbacca",
+ "Darabont",
+ "Demme",
+ "Ferarri",
+ "Jolie",
+ "Lambo",
+ "Lasseter",
+ "Mariah",
+ "Morissette",
+ "Morty",
+ "Odinson",
+ "Pikachu",
+ "Radiohead",
+ "Ramis",
+ "Romanoff",
+ "Shawshank",
+ "Skywalker",
+ "TLDR",
+ "Tiernan",
+ "Weisz",
+ "Wookiee",
+ "XKCD",
+ "codebases",
+ "doomscrolling",
+ "footgun",
+ "keyof",
+ "leetcode",
+ "multicursor",
+ "omniverse",
+ "prolly",
+ "rebeccapurple",
+ "twoslash",
+ "typeof"
+ ]
+}
diff --git a/package.json b/package.json
index 67e3b20d..86677cea 100644
--- a/package.json
+++ b/package.json
@@ -16,9 +16,10 @@
"dev:email": "turbo dev --filter @repo/emails",
"dl-git": "turbo dl-git",
"dl-monaco:force": "turbo dl-monaco",
- "format": "prettier . \"!./apps/**\" \"!./packages/**\" \"!./tooling/**\" --check --cache --cache-location=\"node_modules/.cache/prettiercache\"",
- "format:fix": "prettier . \"!./apps/**\" \"!./packages/**\" \"!./tooling/**\" --write --cache --cache-location=\"node_modules/.cache/prettiercache\" --log-level=warn",
+ "format": "prettier . \"!./apps/**\" \"!./packages/**\" \"!./tooling/**\" \"!challenges/**/tests.ts\" --check --cache --cache-location=\"node_modules/.cache/prettiercache\"",
+ "format:fix": "prettier . \"!./apps/**\" \"!./packages/**\" \"!./tooling/**\" \"!challenges/**/tests.ts\" --write --cache --cache-location=\"node_modules/.cache/prettiercache\" --log-level=warn",
"lint": "eslint . --cache --cache-location \"node_modules/.cache/.eslintcache\" --max-warnings 0",
+ "lint:markdown": "markdownlint-cli2 \"challenges/**/*.md\" \"#**/node_modules\" && cspell challenges/** --no-progress",
"lint:fix": "eslint . --fix --cache --cache-location \"node_modules/.cache/.eslintcache\" --max-warnings 0",
"refresh": "turbo db:reset db:seed --concurrency=1",
"test:e2e": "turbo test:e2e",
@@ -27,6 +28,9 @@
"typecheck": "turbo typecheck --continue"
},
"devDependencies": {
+ "ajv": "^8.12.0",
+ "cspell": "^7.3.8",
+ "markdownlint-cli2": "^0.10.0",
"prettier": "^3.0.2",
"prettier-plugin-tailwindcss": "^0.4.1",
"turbo": "^1.10.13",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 307514e3..97219577 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -22,6 +22,15 @@ importers:
.:
devDependencies:
+ ajv:
+ specifier: ^8.12.0
+ version: 8.12.0
+ cspell:
+ specifier: ^7.3.8
+ version: 7.3.8
+ markdownlint-cli2:
+ specifier: ^0.10.0
+ version: 0.10.0
prettier:
specifier: ^3.0.2
version: 3.0.2
@@ -706,7 +715,7 @@ importers:
dependencies:
'@next/eslint-plugin-next':
specifier: canary
- version: 13.4.20-canary.0
+ version: 13.5.7-canary.37
'@repo/tsconfig':
specifier: workspace:*
version: link:../config-typescript
@@ -718,7 +727,7 @@ importers:
'@vercel/style-guide':
specifier: ^4.0.2
eslint:
specifier: ^8.45.0
version: 8.45.0
@@ -800,7 +809,6 @@ packages:
dependencies:
'@babel/highlight': 7.22.10
chalk: 2.4.2
- dev: false
resolution: {integrity: sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ==}
@@ -933,7 +941,6 @@ packages:
resolution: {integrity: sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==}
engines: {node: '>=6.9.0'}
- dev: false
resolution: {integrity: sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw==}
@@ -958,7 +965,6 @@ packages:
'@babel/helper-validator-identifier': 7.22.5
chalk: 2.4.2
js-tokens: 4.0.0
- dev: false
resolution: {integrity: sha512-lNbdGsQb9ekfsnjFGhEiF4hfFqGgfOP3H3d27re3n+CGhNuTSUEQdfWk556sTLNTloczcdM5TYF2LhzmDQKyvQ==}
@@ -1038,6 +1044,294 @@ packages:
commander: 9.4.1
dev: false
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-Dj8iSGQyfgIsCjmXk9D/SjV7EpbpQSogeaGcBM66H33pd0GyGmLhn3biRN+vqi/vqWmsp75rT3kd5MKa8X5W9Q==}
+ engines: {node: '>=16'}
+ dependencies:
+ '@cspell/dict-ada': 4.0.2
+ '@cspell/dict-aws': 4.0.0
+ '@cspell/dict-bash': 4.1.2
+ '@cspell/dict-companies': 3.0.26
+ '@cspell/dict-cpp': 5.0.9
+ '@cspell/dict-cryptocurrencies': 4.0.0
+ '@cspell/dict-csharp': 4.0.2
+ '@cspell/dict-css': 4.0.12
+ '@cspell/dict-dart': 2.0.3
+ '@cspell/dict-django': 4.1.0
+ '@cspell/dict-docker': 1.1.7
+ '@cspell/dict-dotnet': 5.0.0
+ '@cspell/dict-elixir': 4.0.3
+ '@cspell/dict-en-common-misspellings': 1.0.2
+ '@cspell/dict-en-gb': 1.1.33
+ '@cspell/dict-en_us': 4.3.11
+ '@cspell/dict-filetypes': 3.0.1
+ '@cspell/dict-fonts': 4.0.0
+ '@cspell/dict-fsharp': 1.0.1
+ '@cspell/dict-fullstack': 3.1.5
+ '@cspell/dict-gaming-terms': 1.0.4
+ '@cspell/dict-git': 2.0.0
+ '@cspell/dict-golang': 6.0.4
+ '@cspell/dict-haskell': 4.0.1
+ '@cspell/dict-html': 4.0.5
+ '@cspell/dict-html-symbol-entities': 4.0.0
+ '@cspell/dict-java': 5.0.6
+ '@cspell/dict-k8s': 1.0.2
+ '@cspell/dict-latex': 4.0.0
+ '@cspell/dict-lorem-ipsum': 4.0.0
+ '@cspell/dict-lua': 4.0.2
+ '@cspell/dict-node': 4.0.3
+ '@cspell/dict-npm': 5.0.12
+ '@cspell/dict-php': 4.0.4
+ '@cspell/dict-powershell': 5.0.2
+ '@cspell/dict-public-licenses': 2.0.5
+ '@cspell/dict-python': 4.1.9
+ '@cspell/dict-r': 2.0.1
+ '@cspell/dict-ruby': 5.0.1
+ '@cspell/dict-rust': 4.0.1
+ '@cspell/dict-scala': 5.0.0
+ '@cspell/dict-software-terms': 3.3.9
+ '@cspell/dict-sql': 2.1.2
+ '@cspell/dict-svelte': 1.0.2
+ '@cspell/dict-swift': 2.0.1
+ '@cspell/dict-typescript': 3.1.2
+ '@cspell/dict-vue': 3.0.0
+ dev: true
+
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-FxYJWtDgxIQYxdP0RWwRV8nzLfxVx8D8D5L2sbbP/0NFczDbq/zWYep4nSAHJT10aUJrogsVUYwNwdkr562wKA==}
+ engines: {node: '>=16'}
+ dependencies:
+ '@cspell/cspell-types': 7.3.8
+ dev: true
+
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-/vKPfiHM5bJUkNX12w9j533Lm2JvvSMKUCChM2AxYjy6vL8prc/7ei++4g2xAWwRxLZPg2OfpDJS5EirZNBJdA==}
+ engines: {node: '>=16'}
+ dev: true
+
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-CeyQmhqZI5a+T7a6oiVN90TFlzU3qVVYqCaZ9grFrVOsmzY9ipH5gmqfgMavaBOqb0di/+VZS8d02suMOXcKLQ==}
+ engines: {node: '>=16'}
+ dependencies:
+ global-dirs: 3.0.1
+ dev: true
+
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-3E7gwY6QILrZH83p69i9CERbRBEqeBiKCIKnAd7U2PbxfFqG/P47fqpnarzSWFwFpU92oyGsYry+wC8TEGISRQ==}
+ engines: {node: '>=16'}
+ dev: true
+
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-hsOtaULDnawEL4pU0fga941GhvE8mbTbywrJBx+eGX3fnJsaUr8XQzCtnLsW2ko7WCLWFItNEhSSTPQHBFRLsw==}
+ engines: {node: '>=16'}
+ dev: true
+
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-0kENOWQeHjUlfyId/aCM/mKXtkEgV0Zu2RhUXCBr4hHo9F9vph+Uu8Ww2b0i5a4ZixoIkudGA+eJvyxrG1jUpA==}
+ dev: true
+
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-1YkCMWuna/EGIDN/zKkW+j98/55mxigftrSFgsehXhPld+ZMJM5J9UuBA88YfL7+/ETvBdd7mwW6IwWsC+/ltQ==}
+ dev: true
+
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-AEBWjbaMaJEyAjOHW0F15P2izBjli2cNerG3NjuVH7xX/HUUeNoTj8FF1nwpMufKwGQCvuyO2hCmkVxhJ0y55Q==}
+ dev: true
+
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-BGRZ/Uykx+IgQoTGqvRqbBMQy7QSuY0pbTHgtmKtc1scgzZMJQKMDwyuE6LJzlhdlrV7TsVY0lyXREybnDpQPQ==}
+ dev: true
+
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-ql9WPNp8c+fhdpVpjpZEUWmxBHJXs9CJuiVVfW/iwv5AX7VuMHyEwid+9/6nA8qnCxkUQ5pW83Ums1lLjn8ScA==}
+ dev: true
+
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-EiZp91ATyRxTmauIQfOX9adLYCunKjHEh092rrM7o2eMXP9n7zpXAL9BK7LviL+LbB8VDOm21q+s83cKrrRrsg==}
+ dev: true
+
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-1JMofhLK+4p4KairF75D3A924m5ERMgd1GvzhwK2geuYgd2ZKuGW72gvXpIV7aGf52E3Uu1kDXxxGAiZ5uVG7g==}
+ dev: true
+
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-vGBgPM92MkHQF5/2jsWcnaahOZ+C6OE/fPvd5ScBP72oFY9tn5GLuomcyO0z8vWCr2e0nUSX1OGimPtcQAlvSw==}
+ dev: true
+
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-cLkwo1KT5CJY5N5RJVHks2genFkNCl/WLfj+0fFjqNR+tk3tBI1LY7ldr9piCtSFSm4x9pO1x6IV3kRUY1lLiw==}
+ dev: true
+
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-TaHAZRVe0Zlcc3C23StZqqbzC0NrodRwoSAc8dis+5qLeLLnOCtagYQeROQvDlcDg3X/VVEO9Whh4W/z4PAmYQ==}
+ dev: true
+
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-bKJ4gPyrf+1c78Z0Oc4trEB9MuhcB+Yg+uTTWsvhY6O2ncFYbB/LbEZfqhfmmuK/XJJixXfI1laF2zicyf+l0w==}
+ dev: true
+
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-XlXHAr822euV36GGsl2J1CkBIVg3fZ6879ZOg5dxTIssuhUOCiV2BuzKZmt6aIFmcdPmR14+9i9Xq+3zuxeX0A==}
+ dev: true
+
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-EOwGd533v47aP5QYV8GlSSKkmM9Eq8P3G/eBzSpH3Nl2+IneDOYOBLEUraHuiCtnOkNsz0xtZHArYhAB2bHWAw==}
+ dev: true
+
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-g+uKLWvOp9IEZvrIvBPTr/oaO6619uH/wyqypqvwpmnmpjcfi8+/hqZH8YNKt15oviK8k4CkINIqNhyndG9d9Q==}
+ dev: true
+
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-jg7ZQZpZH7+aAxNBlcAG4tGhYF6Ksy+QS5Df73Oo+XyckBjC9QS+PrRwLTeYoFIgXy5j3ICParK5r3MSSoL4gw==}
+ dev: true
+
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-tKSSUf9BJEV+GJQAYGw5e+ouhEe2ZXE620S7BLKe3ZmpnjlNG9JqlnaBhkIMxKnNFkLY2BP/EARzw31AZnOv4g==}
+ dev: true
+
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-GhdavZFlS2YbUNcRtPbgJ9j6aUyq116LmDQ2/Q5SpQxJ5/6vVs8Yj5WxV1JD+Zh/Zim1NJDcneTOuLsUGi+Czw==}
+ dev: true
+
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-8z8mY1IbrTyTRumx2vvD9yzRhNMk9SajM/GtI5hdMM2pPpNSp25bnuauzjRf300eqlqPY2MNb5MmhBFO014DJw==}
+ dev: true
+
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-t9V4GeN/m517UZn63kZPUYP3OQg5f0OBLSd3Md5CU3eH1IFogSvTzHHnz4Wqqbv8NNRiBZ3HfdY/pqREZ6br3Q==}
+ dev: true
+
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-23xyPcD+j+NnqOjRHgW3IU7Li912SX9wmeefcY0QxukbAxJ/vAN4rBpjSwwYZeQPAn3fxdfdNZs03fg+UM+4yQ==}
+ dev: true
+
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-6ppvo1dkXUZ3fbYn/wwzERxCa76RtDDl5Afzv2lijLoijGGUw5yYdLBKJnx8PJBGNLh829X352ftE7BElG4leA==}
+ dev: true
+
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-hbDduNXlk4AOY0wFxcDMWBPpm34rpqJBeqaySeoUH70eKxpxm+dvjpoRLJgyu0TmymEICCQSl6lAHTHSDiWKZg==}
+ dev: true
+
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-n1AxyX5Kgxij/sZFkxFJlzn3K9y/sCcgVPg/vz4WNJ4K9YeTsUmyGLA2OQI7d10GJeiuAo2AP1iZf2A8j9aj2w==}
+ dev: true
+
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-jOfewPEyN6U9Q80okE3b1PTYBfqZgHh7w4o271GSuAX+VKJ1lUDhdR4bPKRxSDdO5jHArw2u5C8nH2CWGuygbQ==}
+ dev: true
+
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-uRrl65mGrOmwT7NxspB4xKXFUenNC7IikmpRZW8Uzqbqcu7ZRCUfstuVH7T1rmjRgRkjcIjE4PC11luDou4wEQ==}
+ dev: true
+
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-HGRu+48ErJjoweR5IbcixxETRewrBb0uxQBd6xFGcxbEYCX8CnQFTAmKI5xNaIt2PKaZiJH3ijodGSqbKdsxhw==}
+ dev: true
+
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-p0brEnRybzSSWi8sGbuVEf7jSTDmXPx7XhQUb5bgG6b54uj+Z0Qf0V2n8b/LWwIPJNd1GygaO9l8k3HTCy1h4w==}
+ dev: true
+
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-kdE4AHHHrixyZ5p6zyms1SLoYpaJarPxrz8Tveo6gddszBVVwIUZ+JkQE1bWNLK740GWzIXdkznpUfw1hP9nXw==}
+ dev: true
+
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-tLT7gZpNPnGa+IIFvK9SP1LrSpPpJ94a/DulzAPOb1Q2UBFwdpFd82UWhio0RNShduvKG/WiMZf/wGl98pn+VQ==}
+ dev: true
+
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-LPY4y6D5oI7D3d+5JMJHK/wxYTQa2lJMSNxps2JtuF8hbAnBQb3igoWEjEbIbRRH1XBM0X8dQqemnjQNCiAtxQ==}
+ dev: true
+
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-1l3yjfNvMzZPibW8A7mQU4kTozwVZVw0AvFEdy+NcqtbxH+TvbSkNMqROOFWrkD2PjnKG0+Ea0tHI2Pi6Gchnw==}
+ dev: true
+
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-eeC20Q+UnHcTVBK6pgwhSjGIVugO2XqU7hv4ZfXp2F9DxGx1RME0+1sKX4qAGhdFGwOBsEzb2fwUsAEP6Mibpg==}
+ dev: true
+
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-sFlUNI5kOogy49KtPg8SMQYirDGIAoKBO3+cDLIwD4MLdsWy1q0upc7pzGht3mrjuyMiPRUV14Bb0rkVLrxOhg==}
+ dev: true
+
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-T/+WeQmtbxo7ad6hrdI8URptYstKJP+kXyWJZfuVJJGWJQ7yubxrI5Z5AfM+Dh/ff4xHmdzapxD9adaEQ727uw==}
+ dev: true
+
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-fRlLV730fJbulDsLIouZxXoxHt3KIH6hcLFwxaupHL+iTXDg0lo7neRpbqD5MScr/J3idEr7i9G8XWzIikKFug==}
+ dev: true
+
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-IHfWLme3FXE7vnOmMncSBxOsMTdNWd1Vcyhag03WS8oANSgX8IZ+4lMI00mF0ptlgchf16/OU8WsV4pZfikEFw==}
+ dev: true
+
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-91HK4dSRri/HqzAypHgduRMarJAleOX5NugoI8SjDLPzWYkwZ1ftuCXSk+fy8DLc3wK7iOaFcZAvbjmnLhVs4A==}
+ dev: true
+
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-JMA4v/ZPJWuDt3PPFz+23VIY3iDIB+xOTQ6nw+WkcJU5yr6FUl5zMU9ModKrgujg3jGRuuJqofErZVPqHNHYAA==}
+ dependencies:
+ '@cspell/dict-data-science': 1.0.11
+ dev: true
+
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-KCmKaeYMLm2Ip79mlYPc8p+B2uzwBp4KMkzeLd5E6jUlCL93Y5Nvq68wV5fRLDRTf7N1LvofkVFWfDcednFOgA==}
+ dev: true
+
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-rruTm7Emhty/BSYavSm8ZxRuVw0OBqzJkwIFXcV0cX7To8D1qbmS9HFHRuRg8IL11+/nJvtdDz+lMFBSmPUagQ==}
+ dev: true
+
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-xJSSzHDK2z6lSVaOmMxl3PTOtfoffaxMo7fTcbZUF+SCJzfKbO6vnN9TCGX2sx1RHFDz66Js6goz6SAZQdOwaw==}
+ dev: true
+
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-ph0twaRoV+ylui022clEO1dZ35QbeEQaKTaV2sPOsdwIokABPIiK09oWwGK9qg7jRGQwVaRPEq0Vp+IG1GpqSQ==}
+ dev: true
+
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-/O3EWe0SIznx18S7J3GAXPDe7sexn3uTsf4IlnGYK9WY6ZRuEywkXCB+5/USLTGf4+QC05pkHofphdvVSifDyA==}
+ dev: true
+
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-Pi0hAcvsSGtZZeyyAN1VfGtQJbrXos5x2QjJU0niAQKhmITSOrXU/1II1Gogk+FYDjWyV9wP2De0U2f7EWs6oQ==}
+ dev: true
+
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-rPJmnn/GsDs0btNvrRBciOhngKV98yZ9SHmg8qI6HLS8hZKvcXc0LMsf9LLuMK1TmS2+WQFAan6qeqg6bBxL2Q==}
+ dev: true
+
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-gxrCMUOndOk7xZFmXNtkCEeroZRnS2VbeaIPiymGRHj5H+qfTAzAKxtv7jJbVA3YYvEzWcVE2oKDP4wcbhIERw==}
+ dev: true
+
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-lcNOYWjLUvDZdLa0UMNd/LwfVdxhE9rKA+agZBGjL3lTA3uNvH7IUqSJM/IXhJoBpLLMVEOk8v1N9xi+vDuCdA==}
+ dev: true
+
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-niiEMPWPV9IeRBRzZ0TBZmNnkK3olkOPYxC1Ny2AX4TGlYRajcW0WUtoSHmvvjZNfWLSg2L6ruiBeuPSbjnG6A==}
+ dev: true
+
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-s8x7dH/ScfW0pFEIvNFo4JOR7YmvM2wZSHOykmWTJCQ8k2EQ/+uECPp6ZxkoJoukTz8sj+3KzF0fRl5mKxPd6g==}
+ engines: {node: '>=16'}
+ dependencies:
+ import-meta-resolve: 3.0.0
+ dev: true
+
+ /@cspell/[email protected]:
+ resolution: {integrity: sha512-qNnt2wG45wb8JP54mENarnQgxfSYKPp3zlYID/2przbMNmVJRqUlcIBOdLI6plCgGeNkzJTl3T9T1ATbnN+LLw==}
+ engines: {node: '>=16'}
+ dev: true
+
/@emotion/[email protected]:
resolution: {integrity: sha512-m4HEDZleaaCH+XgDDsPF15Ht6wTLsgDTeR3WYj9Q/k76JtWhrJjcP4+/XlG8LGT/Rol9qUfOIztXeA84ATpqPQ==}
dependencies:
@@ -1813,8 +2107,8 @@ packages:
glob: 7.1.7
dev: true
- resolution: {integrity: sha512-vFC1meiw/awh2xJZMWaoECsfZbgkt2fF3HIg8f2fSM/w41Z86L1SS7SjKmpbbD87yq3tiqgqHmFv0JCych4g4g==}
+ resolution: {integrity: sha512-mxkX3gnwEXBV3SvaQumo8i/1OVhpvuqJ1MwfDA3dU5MziMt1RIdVq6Qhq0VZKnsjCMHa4gcxsYAtEKx4vh9JSQ==}
dependencies:
glob: 7.1.7
dev: false
@@ -4511,7 +4805,7 @@ packages:
yoga-wasm-web: 0.3.0
dev: false
resolution: {integrity: sha512-FroL+oOePzhw7n/I+f7zr4WNroGHT/+2TlW6WH9+CVSjMNsEyu7Qstj2mI5gWIBjT1Y2ZImKPppCzI2cIYmNZw==}
engines: {node: '>=16'}
peerDependencies:
@@ -4531,7 +4825,7 @@ packages:
dependencies:
'@babel/core': 7.22.10
'@babel/eslint-parser': 7.22.10(@babel/[email protected])([email protected])
- '@next/eslint-plugin-next': 13.4.20-canary.0
+ '@next/eslint-plugin-next': 13.5.7-canary.37
'@rushstack/eslint-patch': 1.3.2
'@typescript-eslint/eslint-plugin': 5.59.1(@typescript-eslint/[email protected])([email protected])([email protected])
'@typescript-eslint/parser': 5.62.0([email protected])([email protected])
@@ -4749,16 +5043,29 @@ packages:
json-schema-traverse: 0.4.1
uri-js: 4.4.1
+ resolution: {integrity: sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==}
+ dependencies:
+ fast-deep-equal: 3.1.3
+ json-schema-traverse: 1.0.0
+ require-from-string: 2.0.2
+ uri-js: 4.4.1
+ dev: true
+
resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==}
engines: {node: '>=8'}
+ resolution: {integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==}
+ engines: {node: '>=12'}
+ dev: true
+
resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==}
engines: {node: '>=4'}
dependencies:
color-convert: 1.9.3
- dev: false
resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==}
@@ -4816,6 +5123,10 @@ packages:
get-intrinsic: 1.2.1
is-string: 1.0.7
+ resolution: {integrity: sha512-/+3GRL7dDAGEfM6TseQk/U+mi18TU2Ms9I3UlLdUMhz2hbvGNTKdj9xniwXfUqgYhHxRx0+8UnKkvlNwVU+cWQ==}
+ dev: true
+
resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==}
engines: {node: '>=8'}
@@ -5111,6 +5422,13 @@ packages:
traverse: 0.3.9
dev: false
+ resolution: {integrity: sha512-T2VJbcDuZQ0Tb2EWwSotMPJjgpy1/tGee1BTpUNsGZ/qgNjV2t7Mvu+d4600U564nbLesN1x2dPL+xii174Ekg==}
+ engines: {node: '>=14.16'}
+ dependencies:
+ chalk: 5.3.0
+ dev: true
+
resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==}
engines: {node: '>=4'}
@@ -5118,7 +5436,6 @@ packages:
ansi-styles: 3.2.1
escape-string-regexp: 1.0.5
supports-color: 5.5.0
- dev: false
resolution: {integrity: sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==}
@@ -5135,6 +5452,11 @@ packages:
ansi-styles: 4.3.0
supports-color: 7.2.0
+ resolution: {integrity: sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==}
+ engines: {node: ^12.17.0 || ^14.13 || >=16.0.0}
+ dev: true
+
resolution: {integrity: sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==}
dev: false
@@ -5204,6 +5526,14 @@ packages:
engines: {node: '>=6'}
dev: true
+ resolution: {integrity: sha512-LWAxzHqdHsAZlPlEyJ2Poz6AIs384mPeqLVCru2p0BrP9G/kVGuhNyZYClLO6cXlnuJjzC8xtsJIuMjKqLXoAw==}
+ engines: {node: '>=8'}
+ dependencies:
+ parent-module: 2.0.0
+ resolve-from: 5.0.0
+ dev: true
+
resolution: {integrity: sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==}
engines: {node: '>=8'}
@@ -5248,7 +5578,6 @@ packages:
resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==}
dependencies:
color-name: 1.1.3
- dev: false
resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==}
@@ -5258,7 +5587,6 @@ packages:
resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==}
- dev: false
resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==}
@@ -5286,6 +5614,11 @@ packages:
engines: {node: '>=14'}
dev: false
+ resolution: {integrity: sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==}
+ engines: {node: '>=16'}
+ dev: true
+
resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==}
@@ -5308,6 +5641,17 @@ packages:
engines: {node: ^12.20.0 || >=14}
dev: false
+ resolution: {integrity: sha512-SsxdiOf064DWoZLH799Ata6u7iV658A11PlWtZATDlXPpKGJnbJZ5Z24ybixAi+LUUqJ/GKowAejtC5GFUG7Tw==}
+ engines: {node: '>= 6'}
+ dependencies:
+ array-timsort: 1.0.3
+ core-util-is: 1.0.3
+ esprima: 4.0.1
+ has-own-prop: 2.0.0
+ repeat-string: 1.6.1
+ dev: true
+
resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==}
dev: false
@@ -5317,7 +5661,7 @@ packages:
dev: false
- resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=}
+ resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==}
resolution: {integrity: sha512-P7X+QL9Hb9B/c8HI5BFFKmjgBu2XpQuF98WZ9XkO+dBGgk5XgwiQz7o1SmpglNWId3581UcS0SFAWfoIhMHPfg==}
@@ -5335,6 +5679,17 @@ packages:
proto-list: 1.2.4
dev: false
+ resolution: {integrity: sha512-cD31W1v3GqUlQvbBCGcXmd2Nj9SvLDOP1oQ0YFuLETufzSPaKp11rYBsSOm7rCsW3OnIRAFM3OxRhceaXNYHkA==}
+ engines: {node: '>=12'}
+ dependencies:
+ dot-prop: 6.0.1
+ graceful-fs: 4.2.11
+ unique-string: 3.0.0
+ write-file-atomic: 3.0.3
+ xdg-basedir: 5.1.0
+ dev: true
+
resolution: {integrity: sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==}
dev: false
@@ -5357,7 +5712,6 @@ packages:
resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==}
- dev: false
resolution: {integrity: sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==}
@@ -5370,6 +5724,16 @@ packages:
yaml: 1.10.2
dev: false
+ resolution: {integrity: sha512-da1EafcpH6b/TD8vDRaWV7xFINlHlF6zKsGwS1TsuVJTZRkquaS5HTMq7uq6h31619QjbsYl21gVDOm32KM1vQ==}
+ engines: {node: '>=14'}
+ dependencies:
+ import-fresh: 3.3.0
+ js-yaml: 4.1.0
+ parse-json: 5.2.0
+ path-type: 4.0.0
+ dev: true
+
resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==}
engines: {node: '>= 8'}
@@ -5378,6 +5742,125 @@ packages:
shebang-command: 2.0.0
which: 2.0.2
+ resolution: {integrity: sha512-x8dy3RnvYdlUcPOjkEHqozhiwzKNSq7GcPuXFbnyMOCHxX8V3OgIg/pYuabl2sbUPfIJaeAQB7PMOK8DFIdoRA==}
+ engines: {node: '>=12'}
+ dependencies:
+ type-fest: 1.4.0
+ dev: true
+
+ resolution: {integrity: sha512-gkq4t78eLR0xC3P0vDDHPeNY4iZRd5YE6Z8uDJ7RM4UaX/TSdVUN9KNFr34RnJ119NYVHujpL9+uW7wPSAe8Eg==}
+ engines: {node: '>=16'}
+ dependencies:
+ '@cspell/cspell-pipe': 7.3.8
+ '@cspell/cspell-types': 7.3.8
+ cspell-trie-lib: 7.3.8
+ fast-equals: 4.0.3
+ gensequence: 6.0.0
+ dev: true
+
+ resolution: {integrity: sha512-vJzCOUEiw6/MwV/U4Ux3bgSdj9mXB+X5eHL+qzVoyFI7ArlvrkuGTL+iFJThQcS8McM3SGqtvaBNCiKBmAeCkA==}
+ engines: {node: '>=16'}
+ hasBin: true
+ dependencies:
+ cspell-glob: 7.3.8
+ find-up: 5.0.0
+ dev: true
+
+ resolution: {integrity: sha512-wUZC6znyxEs0wlhzGfZ4XHkATPJyazJIFi/VvAdj+KHe7U8SoSgitJVDQqdgectI2y3MxR7lQdVLX9dONFh+7A==}
+ engines: {node: '>=16'}
+ dependencies:
+ micromatch: 4.0.5
+ dev: true
+
+ resolution: {integrity: sha512-nTjAlMAZAVSFhBd9U3MB9l5FfC5JCCr9DTOA2wWxusVOm+36MbSEH90ucLPkhPa9/+0HtbpDhqVMwXCZllRpsg==}
+ engines: {node: '>=16'}
+ hasBin: true
+ dependencies:
+ '@cspell/cspell-pipe': 7.3.8
+ '@cspell/cspell-types': 7.3.8
+ dev: true
+
+ resolution: {integrity: sha512-XrxPbaiek7EZh+26k9RYVz2wKclaMqM6mXBiu/kpFAHRHHfz91ado6xWvyxZ7UAxQ8ixEwZ+oz9TU+k21gHzyw==}
+ engines: {node: '>=16'}
+ dependencies:
+ '@cspell/cspell-service-bus': 7.3.8
+ node-fetch: 2.7.0
+ transitivePeerDependencies:
+ - encoding
+ dev: true
+
+ resolution: {integrity: sha512-2L770sI5DdsAKVzO3jxmfP2fz4LryW6dzL93BpN7WU+ebFC6rg4ioa5liOJV4WoDo2fNQMSeqfW4Aawu9zWR7A==}
+ engines: {node: '>=16'}
+ dependencies:
+ '@cspell/cspell-bundled-dicts': 7.3.8
+ '@cspell/cspell-pipe': 7.3.8
+ '@cspell/cspell-resolver': 7.3.8
+ '@cspell/cspell-types': 7.3.8
+ '@cspell/dynamic-import': 7.3.8
+ '@cspell/strong-weak-map': 7.3.8
+ clear-module: 4.1.2
+ comment-json: 4.2.3
+ configstore: 6.0.0
+ cosmiconfig: 8.0.0
+ cspell-dictionary: 7.3.8
+ cspell-glob: 7.3.8
+ cspell-grammar: 7.3.8
+ cspell-io: 7.3.8
+ cspell-trie-lib: 7.3.8
+ fast-equals: 5.0.1
+ find-up: 6.3.0
+ gensequence: 6.0.0
+ import-fresh: 3.3.0
+ resolve-from: 5.0.0
+ vscode-languageserver-textdocument: 1.0.11
+ vscode-uri: 3.0.8
+ transitivePeerDependencies:
+ - encoding
+ dev: true
+
+ resolution: {integrity: sha512-UQx1Bazbyz2eQJ/EnMohINnUdZvAQL+OcQU3EPPbNWM1DWF4bJGgmFXKNCRYfJk6wtOZVXG5g5AZXx9KnHeN9A==}
+ engines: {node: '>=16'}
+ dependencies:
+ '@cspell/cspell-pipe': 7.3.8
+ '@cspell/cspell-types': 7.3.8
+ gensequence: 6.0.0
+ dev: true
+
+ resolution: {integrity: sha512-8AkqsBQAMsKYV5XyJLB6rBs5hgspL4+MPOg6mBKG2j5EvQgRVc6dIfAPWDNLpIeW2a3+7K5BIWqKHapKPeiknQ==}
+ engines: {node: '>=16'}
+ hasBin: true
+ dependencies:
+ '@cspell/cspell-json-reporter': 7.3.8
+ '@cspell/cspell-pipe': 7.3.8
+ '@cspell/cspell-types': 7.3.8
+ '@cspell/dynamic-import': 7.3.8
+ chalk: 5.3.0
+ chalk-template: 1.1.0
+ commander: 11.1.0
+ cspell-gitignore: 7.3.8
+ cspell-glob: 7.3.8
+ cspell-io: 7.3.8
+ cspell-lib: 7.3.8
+ fast-glob: 3.3.1
+ fast-json-stable-stringify: 2.1.0
+ file-entry-cache: 7.0.1
+ get-stdin: 9.0.0
+ semver: 7.5.4
+ strip-ansi: 7.1.0
+ vscode-uri: 3.0.8
+ transitivePeerDependencies:
+ - encoding
+ dev: true
+
resolution: {integrity: sha512-2EZLisiZQ+7m4wwur/qiYJRniHX4K5Tc9w93MT3AS0WS1u5kaZ4FKXlOTBhOjc+CgEgPiGY+fX1yWD8UwpEqUA==}
dev: false
@@ -5616,6 +6099,13 @@ packages:
domhandler: 5.0.3
dev: false
+ resolution: {integrity: sha512-tE7ztYzXHIeyvc7N+hR3oi7FIbf/NIjVP9hmAt3yMXzrQ072/fpjGLx2GxNxGxUl5V73MEqYzioOMoVhGMJ5cA==}
+ engines: {node: '>=10'}
+ dependencies:
+ is-obj: 2.0.0
+ dev: true
+
resolution: {integrity: sha512-ODHbGTskqRtXAzZapDPvgNuDVQApu4oKX8lZW7Y0+9hKA6le1ZJlyRS687oU9FXjOVEDU/VFV6zI125HzhM1UQ==}
hasBin: true
@@ -5695,6 +6185,11 @@ packages:
graceful-fs: 4.2.11
tapable: 2.2.1
+ resolution: {integrity: sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==}
+ engines: {node: '>=0.12'}
+ dev: true
+
resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==}
engines: {node: '>=0.12'}
@@ -5704,7 +6199,6 @@ packages:
resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==}
dependencies:
is-arrayish: 0.2.1
- dev: false
resolution: {integrity: sha512-ioRRcXMO6OFyRpyzV3kE1IIBd4WG5/kltnzdxSCqoP8CMGs/Li+M1uF5o7lOkZVFjDs+NLesthnF66Pg/0q0Lw==}
@@ -6076,7 +6570,6 @@ packages:
resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==}
engines: {node: '>=0.8.0'}
- dev: false
resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==}
@@ -6541,7 +7034,6 @@ packages:
resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==}
engines: {node: '>=4'}
hasBin: true
- dev: false
resolution: {integrity: sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==}
@@ -6617,6 +7109,15 @@ packages:
resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==}
+ resolution: {integrity: sha512-G3BSX9cfKttjr+2o1O22tYMLq0DPluZnYtq1rXumE1SpL/F/SLIfHx08WYQoWSIpeMYf8sRbJ8++71+v6Pnxfg==}
+ dev: true
+
+ resolution: {integrity: sha512-WF1Wi8PwwSY7/6Kx0vKXtw8RwuSGoM1bvDaJbu7MxDlR1vovZjIAKrnzyrThgAjm6JDTu0fVgWXDlMGspodfoQ==}
+ engines: {node: '>=6.0.0'}
+ dev: true
+
resolution: {integrity: sha512-F3tRpfkAzb7TT2JNKaJUglyuRjRa+jelQD94s9OSqkfEeytLmupCqQiD+H2KoIXGtp4pB5m4zNmv5m2Ktcr+LA==}
hasBin: true
@@ -6635,6 +7136,17 @@ packages:
merge2: 1.4.1
micromatch: 4.0.5
+ 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
+
resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==}
@@ -6670,6 +7182,13 @@ packages:
dependencies:
flat-cache: 3.0.4
+ resolution: {integrity: sha512-uLfFktPmRetVCbHe5UPuekWrQ6hENufnA46qEGbfACkK5drjTTdQYUragRgMjHldcbYG+nslUerqMPjbBSHXjQ==}
+ engines: {node: '>=12.0.0'}
+ dependencies:
+ flat-cache: 3.1.1
+ dev: true
+
resolution: {integrity: sha512-QlZ5yJC0VxHxQQsQhXvBaC7VRJ2uaxTf+Tfpu4Z/OcVQJVpZO+DGU0rkoVW5ce2SccxugvpBJoMvUs59iILYdw==}
engines: {node: '>= 12'}
@@ -6702,6 +7221,14 @@ packages:
locate-path: 6.0.0
path-exists: 4.0.0
+ resolution: {integrity: sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==}
+ engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
+ dependencies:
+ locate-path: 7.2.0
+ path-exists: 5.0.0
+ dev: true
+
resolution: {integrity: sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==}
engines: {node: ^10.12.0 || >=12.0.0}
@@ -6709,9 +7236,22 @@ packages:
flatted: 3.2.7
rimraf: 3.0.2
+ resolution: {integrity: sha512-/qM2b3LUIaIgviBQovTLvijfyOQXPtSRnRK26ksj2J7rzPIecePUIpJsZ4T02Qg+xiAEKIs5K8dsHEd+VaKa/Q==}
+ engines: {node: '>=12.0.0'}
+ dependencies:
+ flatted: 3.2.9
+ keyv: 4.5.4
+ rimraf: 3.0.2
+ dev: true
+
resolution: {integrity: sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==}
+ resolution: {integrity: sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==}
+ dev: true
+
resolution: {integrity: sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==}
engines: {node: '>=4.0'}
@@ -6846,6 +7386,11 @@ packages:
resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==}
+ resolution: {integrity: sha512-8WwuywE9pokJRAcg2QFR/plk3cVPebSUqRPzpGQh3WQ0wIiHAw+HyOQj5IuHyUTQBHpBKFoB2JUMu9zT3vJ16Q==}
+ engines: {node: '>=16'}
+ dev: true
+
resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==}
engines: {node: '>=6.9.0'}
@@ -6869,6 +7414,11 @@ packages:
engines: {node: '>=8'}
dev: false
+ resolution: {integrity: sha512-dVKBjfWisLAicarI2Sf+JuBE/DghV4UzNAVe9yhEJuzeREd3JhOTE9cUaJTeSa77fsbQUK3pcOpJfM59+VKZaA==}
+ engines: {node: '>=12'}
+ dev: true
+
resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==}
engines: {node: '>=10'}
@@ -6960,6 +7510,13 @@ packages:
once: 1.4.0
dev: false
+ resolution: {integrity: sha512-NBcGGFbBA9s1VzD41QXDG+3++t9Mn5t1FpLdhESY6oKY4gYTFpX4wO3sqGUa0Srjtbfj3szX0RnemmrVRUdULA==}
+ engines: {node: '>=10'}
+ dependencies:
+ ini: 2.0.0
+ dev: true
+
resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==}
engines: {node: '>=4'}
@@ -7026,12 +7583,16 @@ packages:
resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==}
engines: {node: '>=4'}
- dev: false
resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==}
engines: {node: '>=8'}
+ resolution: {integrity: sha512-Pq0h+hvsVm6dDEa8x82GnLSYHOzNDt7f0ddFa3FqcQlgzEiptPqL+XrOJNavjOzSYiYWIrgeVYYgGlLmnxwilQ==}
+ engines: {node: '>=8'}
+ dev: true
+
resolution: {integrity: sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==}
dependencies:
@@ -7292,6 +7853,10 @@ packages:
parent-module: 1.0.1
resolve-from: 4.0.0
+ resolution: {integrity: sha512-4IwhLhNNA8yy445rPjD/lWh++7hMDOml2eHtd58eG7h+qK3EryMuuRbsHGPikCoAgIkkDnckKfWSk2iDla/ejg==}
+ dev: true
+
resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==}
engines: {node: '>=0.8.19'}
@@ -7313,6 +7878,11 @@ packages:
resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==}
dev: false
+ resolution: {integrity: sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==}
+ engines: {node: '>=10'}
+ dev: true
+
resolution: {integrity: sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q==}
dev: false
@@ -7376,7 +7946,6 @@ packages:
resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==}
- dev: false
resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==}
@@ -7494,6 +8063,11 @@ packages:
resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==}
engines: {node: '>=0.12.0'}
+ resolution: {integrity: sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==}
+ engines: {node: '>=8'}
+ dev: true
+
resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==}
engines: {node: '>=8'}
@@ -7555,6 +8129,10 @@ packages:
gopd: 1.0.1
has-tostringtag: 1.0.0
+ resolution: {integrity: sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==}
+ dev: true
+
resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==}
engines: {node: '>=10'}
@@ -7658,12 +8236,20 @@ packages:
hasBin: true
dev: false
+ resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==}
+ dev: true
+
resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==}
resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==}
+ resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==}
+ dev: true
+
resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==}
@@ -7726,6 +8312,12 @@ packages:
safe-buffer: 5.2.1
dev: true
+ resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==}
+ dependencies:
+ json-buffer: 3.0.1
+ dev: true
+
resolution: {integrity: sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==}
engines: {node: '>=0.10.0'}
@@ -7770,6 +8362,12 @@ packages:
resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==}
+ resolution: {integrity: sha512-C7bfi1UZmoj8+PQx22XyeXCuBlokoyWQL5pWSP+EI6nzRylyThouddufc2c1NDIcP9k5agmN9fLpA7VNJfIiqw==}
+ dependencies:
+ uc.micro: 1.0.6
+ dev: true
+
resolution: {integrity: sha512-3mk/Zag0+IJxeDrxSgaDPy4zZ3w05PRZeJNnlWhzFz5OkX49J4krc+A8X2d2M69vGMBEX0uyl8M+W+8gH+kBqQ==}
dev: false
@@ -7811,6 +8409,13 @@ packages:
dependencies:
p-locate: 5.0.0
+ resolution: {integrity: sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==}
+ engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
+ dependencies:
+ p-locate: 6.0.0
+ dev: true
+
resolution: {integrity: sha512-aVx8ztPv7/2ULbArGJ2Y42bG1mEQ5mGjpdvrbJcJFU3TbYybe+QlLS4pst9zV52ymy2in1KpFPiZnAOATxD4+Q==}
dev: true
@@ -7891,10 +8496,55 @@ packages:
'@jridgewell/sourcemap-codec': 1.4.15
dev: false
+ resolution: {integrity: sha512-lTlxriVoy2criHP0JKRhO2VDG9c2ypWCsT237eDiLqi09rmbKoUetyGHq2uOIRoRS//kfoJckS0eUzzkDR+k2Q==}
+ hasBin: true
+ dependencies:
+ argparse: 2.0.1
+ entities: 3.0.1
+ linkify-it: 4.0.1
+ mdurl: 1.0.1
+ uc.micro: 1.0.6
+ dev: true
+
resolution: {integrity: sha512-Z1NL3Tb1M9wH4XESsCDEksWoKTdlUafKc4pt0GRwjUyXaCFZ+dc3g2erqB6zm3szA2IUSi7VnPI+o/9jnxh9hw==}
dev: false
+ resolution: {integrity: sha512-xm2rM0E+sWgjpPn1EesPXx5hIyrN2ddUnUwnbCsD/ONxYtw3PX6LydvdH6dciWAoFDpwzbHM1TO7uHfcMd6IYg==}
+ peerDependencies:
+ markdownlint-cli2: '>=0.0.4'
+ dependencies:
+ markdownlint-cli2: 0.10.0
+ dev: true
+
+ resolution: {integrity: sha512-kVxjPyKFC+eW7iqcxiNI50RDzwugpXkEX5eQlDso/0IUs9M73jXYguLFHDzgi5KatcxU/57Fu8KoGtkFft9lfA==}
+ engines: {node: '>=16'}
+ hasBin: true
+ dependencies:
+ globby: 13.2.2
+ markdownlint: 0.31.1
+ markdownlint-cli2-formatter-default: 0.0.4([email protected])
+ micromatch: 4.0.5
+ strip-json-comments: 5.0.1
+ yaml: 2.3.2
+ dev: true
+
+ resolution: {integrity: sha512-BbRPTC72fl5vlSKv37v/xIENSRDYL/7X/XoFzZ740FGEbs9vZerLrIkFRY0rv7slQKxDczToYuMmqQFN61fi4Q==}
+ engines: {node: '>=16'}
+ dev: true
+
+ resolution: {integrity: sha512-CKMR2hgcIBrYlIUccDCOvi966PZ0kJExDrUi1R+oF9PvqQmCrTqjOsgIvf2403OmJ+CWomuzDoylr6KbuMyvHA==}
+ engines: {node: '>=16'}
+ dependencies:
+ markdown-it: 13.0.1
+ markdownlint-micromark: 0.1.7
+ dev: true
+
resolution: {integrity: sha512-8SVPMuHqlPME/z3gqVwWY4zVXn8lqKv/pAhC57FuJ40ImXyBpmO5ukh98zB2v7Blql2FiHjHv9LVztSIqjY+MA==}
dependencies:
@@ -8026,6 +8676,10 @@ packages:
'@types/mdast': 3.0.12
dev: false
+ resolution: {integrity: sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==}
+ dev: true
+
resolution: {integrity: sha512-rkpe71W0N0c0Xz6QD0eJETuWAJGnJ9afsl1srmwPrI+yBCkge5EycXXbYRyvL29zZVUWQCY7InPRCv3GDXuZNw==}
dev: false
@@ -8524,6 +9178,18 @@ packages:
whatwg-url: 5.0.0
dev: false
+ resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==}
+ engines: {node: 4.x || >=6.0.0}
+ peerDependencies:
+ encoding: ^0.1.0
+ peerDependenciesMeta:
+ encoding:
+ optional: true
+ dependencies:
+ whatwg-url: 5.0.0
+ dev: true
+
resolution: {integrity: sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==}
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
@@ -8746,6 +9412,13 @@ packages:
dependencies:
yocto-queue: 0.1.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
+
resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==}
engines: {node: '>=8'}
@@ -8759,6 +9432,13 @@ packages:
dependencies:
p-limit: 3.1.0
+ resolution: {integrity: sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==}
+ engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
+ dependencies:
+ p-limit: 4.0.0
+ dev: true
+
resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==}
engines: {node: '>=6'}
@@ -8770,6 +9450,13 @@ packages:
dependencies:
callsites: 3.1.0
+ resolution: {integrity: sha512-uo0Z9JJeWzv8BG+tRcapBKNJ0dro9cLyczGzulS6EfeyAdeC9sbojtW6XwvYxJkEne9En+J2XEl4zyglVeIwFg==}
+ engines: {node: '>=8'}
+ dependencies:
+ callsites: 3.1.0
+ dev: true
+
resolution: {integrity: sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==}
dependencies:
@@ -8802,7 +9489,6 @@ packages:
error-ex: 1.3.2
json-parse-even-better-errors: 2.3.1
lines-and-columns: 1.2.4
- dev: false
resolution: {integrity: sha512-twN+njEipszzlMJd4ONUYgSfZPDxgHhT9Ahed5uTigpQn90FggW4SA/AIPq/6a149fTbE9qBEcSwE3FAEp6wQQ==}
@@ -8823,6 +9509,11 @@ packages:
resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==}
engines: {node: '>=8'}
+ resolution: {integrity: sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==}
+ engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
+ dev: true
+
resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==}
engines: {node: '>=0.10.0'}
@@ -9761,6 +10452,16 @@ packages:
resolution: {integrity: sha512-7pXIJqJOq5tFgG1A2Zxti3Ht8jJF337m4sowbuHsW30ZnkQFnDzy9qBNhgzX8ZLW4+UBcXiiR7SwR6pokHsxiA==}
dev: false
+ resolution: {integrity: sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==}
+ engines: {node: '>=0.10'}
+ dev: true
+
+ resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==}
+ engines: {node: '>=0.10.0'}
+ dev: true
+
resolution: {integrity: sha512-lakm76u4MiIDeMF1s2tCmjtksOhwZOs4WcAXkA7aUTvl+63/h+0h6Q6WnkB8RGtj6GakUhQuUkiZshfXgtIrGw==}
dependencies:
@@ -10174,6 +10875,13 @@ packages:
dependencies:
ansi-regex: 5.0.1
+ resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==}
+ engines: {node: '>=12'}
+ dependencies:
+ ansi-regex: 6.0.1
+ dev: true
+
resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==}
engines: {node: '>=4'}
@@ -10197,6 +10905,11 @@ packages:
resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==}
engines: {node: '>=8'}
+ resolution: {integrity: sha512-0fk9zBqO67Nq5M/m45qHCJxylV/DhBlIOVExqgOMiCCrzrhU6tCibRXNqE3jwJLftzE9SNuZtYbpzcO+i9FiKw==}
+ engines: {node: '>=14.16'}
+ dev: true
+
resolution: {integrity: sha512-zKI5gN/zb7LS/Vm0eUwjmjrXWw8IMtyA8aPBJZdYiQTXj4+wQ3IucOLIOnF7zCHxvW8UhIGh/uZh/t9zEHXNTQ==}
dependencies:
@@ -10275,7 +10988,6 @@ packages:
engines: {node: '>=4'}
dependencies:
has-flag: 3.0.0
- dev: false
resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==}
@@ -10449,7 +11161,6 @@ packages:
resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==}
- dev: false
resolution: {integrity: sha512-iawgk0hLP3SxGKDfnDJf8wTz4p2qImnyihM5Hh/sGvQ3K37dPi/w8sRhdNIxYA1TwFwc5mDhIJq+O0RsvXBKdQ==}
@@ -10640,6 +11351,11 @@ packages:
engines: {node: '>=8'}
dev: false
+ resolution: {integrity: sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==}
+ engines: {node: '>=10'}
+ dev: true
+
resolution: {integrity: sha512-Gur3yQGM9qiLNs0KPP7LPgeRbio2QTt4xXouobMCarR0/wyW3F+F/+OWwshg3NG0Adon7uQfSZBpB46NfhoF1A==}
engines: {node: '>=14.16'}
@@ -10679,11 +11395,21 @@ packages:
for-each: 0.3.3
is-typed-array: 1.1.10
+ resolution: {integrity: sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==}
+ dependencies:
+ is-typedarray: 1.0.0
+ dev: true
+
resolution: {integrity: sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==}
engines: {node: '>=14.17'}
hasBin: true
+ resolution: {integrity: sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==}
+ dev: true
+
resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==}
dependencies:
@@ -10704,6 +11430,13 @@ packages:
vfile: 5.3.7
dev: false
+ resolution: {integrity: sha512-VGXBUVwxKMBUznyffQweQABPRRW1vHZAbadFZud4pLFAqRGvv/96vafgjWFqzourzr8YonlQiPgH0YCJfawoGQ==}
+ engines: {node: '>=12'}
+ dependencies:
+ crypto-random-string: 4.0.0
+ dev: true
+
resolution: {integrity: sha512-RynicUM/vbOSTSiUK+BnaK9XMfmQUh6gyi7L6taNgc7FIf84GukXVV3ucGzEN/PhUUkdP5hb1MmXc+3cvPUm5Q==}
dependencies:
@@ -10950,6 +11683,14 @@ packages:
vfile-message: 3.1.4
dev: false
+ resolution: {integrity: sha512-X+8T3GoiwTVlJbicx/sIAF+yuJAqz8VvwJyoMVhwEMoEKE/fkDmrqUgDMyBECcM2A2frVZIUj5HI/ErRXCfOeA==}
+ dev: true
+
+ resolution: {integrity: sha512-AyFQ0EVmsOZOlAnxoFOGOq1SQDWAB7C6aqMGS23svWAllfOaxbuFvcT8D1i8z3Gyn8fraVeZNNmN6e9bxxXkKw==}
+ dev: true
+
resolution: {integrity: sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==}
engines: {node: '>=10.13.0'}
@@ -10974,7 +11715,6 @@ packages:
resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==}
- dev: false
resolution: {integrity: sha512-j9b8ynpJS4K+zfO5GGwsAcQX4ZHpWV+yRiHDiL+bE0XHJ8NiPYLTNVQdlFYWxtpg9lfAQNlwJg16J9AJtFSXRg==}
@@ -11047,7 +11787,6 @@ packages:
dependencies:
tr46: 0.0.3
webidl-conversions: 3.0.1
- dev: false
resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==}
@@ -11079,6 +11818,15 @@ packages:
resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==}
+ resolution: {integrity: sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==}
+ dependencies:
+ imurmurhash: 0.1.4
+ is-typedarray: 1.0.0
+ signal-exit: 3.0.7
+ typedarray-to-buffer: 3.1.5
+ dev: true
+
resolution: {integrity: sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==}
engines: {node: '>=8.3.0'}
@@ -11092,6 +11840,11 @@ packages:
optional: true
dev: false
+ resolution: {integrity: sha512-GCPAHLvrIH13+c0SuacwvRYj2SxJXQ4kaVTT5xgL3kPrz56XxkF21IGhjSE1+W0aw7gpBWRGXLCPnPby6lSpmQ==}
+ engines: {node: '>=12'}
+ dev: true
+
resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==}
engines: {node: '>=0.4'}
@@ -11112,10 +11865,20 @@ packages:
resolution: {integrity: sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ==}
engines: {node: '>= 14'}
+ resolution: {integrity: sha512-N/lyzTPaJasoDmfV7YTrYCI0G/3ivm/9wdG0aHuheKowWQwGTsK0Eoiw6utmzAnI6pkJa0DUVygvp3spqqEKXg==}
+ engines: {node: '>= 14'}
+ dev: true
+
resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==}
engines: {node: '>=10'}
+ resolution: {integrity: sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==}
+ engines: {node: '>=12.20'}
+ dev: true
+
resolution: {integrity: sha512-rD3L4jyMlO1m+RWU60lNwZQK5zmzglCV5fI1gTRikmpv3YzmNIZQbjyfE6cMNb9Xaly/C1SwemYGbsiOekMvnQ==}
dev: false