Skip to content

Commit

Permalink
2023-08-23T15:52:06.282Z
Browse files Browse the repository at this point in the history
  • Loading branch information
mattpocock committed Aug 23, 2023
1 parent d6d1c87 commit 6fd3408
Show file tree
Hide file tree
Showing 42 changed files with 35 additions and 0 deletions.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
21 changes: 21 additions & 0 deletions src/075-designing-your-types/plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,24 @@
Title here!

## Exercises

- Modeling your domain in TypeScript
- Defining types that represent the concepts and entities of the problem domain
- Users, Products, Orders, etc.
- Modeling early helps keep code maintainable
- Helper types
- Types that are defined using other types that help you manipulate, transform, or constrain existing types
- Type arguments in types
- The parameters you pass to a generic type
- Can be any valid type expression
- e.g. `Array<string>` is a type that takes a type argument `string` and represents an array of strings
- Type variables, constraints, defaults, and inference make type arguments more flexible and expressive
- Composing types into other types
- Use unions and intersections
- `User & Admin`
- Template literals for strings
- Create string types based on template literals which can contain placeholders, expressions, and modifiers
- e.g. a string type representing a valid email address with `@` and `.` as placeholders
- `type Email = `${string}@${string}.${string}`;`
- Create your own with generics, keyof, typeof, indexed access, conditional types, and mapped types
- Example of a helper type that makes all properties of a type optional except for a few specified ones
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
14 changes: 14 additions & 0 deletions src/080-configuring-typescript/plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,17 @@
Title here!

## Exercises

- `tsconfig.json`
- The file that contains compiler options and the files or folders to compile
- Nesting `tsconfig.json` inside subfolders
- Multiple `tsconfig.json` files can be in different subfolders of the project, and each will be treated as a separate project
- The `extends` property can be used to inherit configuration from another `tsconfig.json` and override or add options.
- My recommended `tsconfig.json`
- Commonly used `tsconfig.json` attributes:
- `jsx`
- `strict`
- `noImplicitAny`, `strictNullChecks`, `strictFunctionTypes`, etc.
- `noUncheckedIndexedAccess`
- `moduleResolution`
- `declaration` and `declarationMap`

0 comments on commit 6fd3408

Please sign in to comment.