MCPcopy
hub / github.com/total-typescript/total-typescript-book

github.com/total-typescript/total-typescript-book @main sqlite

repository ↗ · DeepWiki ↗
530 symbols 1,175 edges 555 files 1 documented · 0%
README

Total TypeScript by Matt Pocock

Quickstart

Install PNPM

Because this course is so big we're using pnpm as the package manager. It's like npm, but results in fewer node_modules saved to disk.

Install pnpm globally.

Install Dependencies

# Installs all dependencies
pnpm install

# Asks you which exercise you'd like to run, and runs it
pnpm run exercise

How to take the course

You'll notice that the course is split into exercises. Each exercise is split into a *.problem and a *.solution.

To take an exercise:

  1. Run pnpm exercise
  2. Choose which exercise you'd like to run.

This course encourages active, exploratory learning. In the video, I'll explain a problem, and you'll be asked to try to find a solution. To attempt a solution, you'll need to:

  1. Check out TypeScript's docs.
  2. Try to find something that looks relevant.
  3. Give it a go to see if it solves the problem.

You'll know if you've succeeded because the tests will pass.

If you succeed, or if you get stuck, unpause the video and check out the *.solution. You can see if your solution is better or worse than mine!

Acknowledgements

Say thanks to Matt on Twitter or by joining his Discord. Consider signing up to his Total TypeScript course.

Reference

pnpm run exercise

Alias: pnpm run e

Open a prompt for choosing which exercise you'd like to run.

Extension points exported contracts — how you extend this code

IShape (Interface)
(no doc) [2 implementers]
src/030-classes/115-implementing-interfaces-or-types.solution.2.ts
MyInterface (Interface)
(no doc)
src/060-modules-scripts-and-declaration-files/161-declaration-files.explainer/src/can-export-types.d.ts
Rectangle (Interface)
(no doc)
src/032-typescript-only-features/123-interfaces-within-namespaces-can-declaration-merge.explainer.ts
User (Interface)
(no doc)
src/020-objects/082.5-extending-incompatible-properties.solution.ts
Dog (Interface)
(no doc)
src/045-annotations-and-assertions/143-limits-of-as.explainer.ts
User (Interface)
(no doc)
src/085-the-utils-folder/222-assertion-functions.problem.ts
User (Interface)
(no doc)
src/050-the-weird-parts/154.6-iterating-over-objects.solution.3.ts
Window (Interface)
(no doc)
src/065-types-you-dont-control/174.5-modifying-window.solution/src/window.d.ts

Core symbols most depended-on inside this repo

log
called by 79
src/020-objects/088-declaration-merging-of-interfaces.problem.ts
func
called by 15
src/016.5-ide-superpowers/050-refactor.problem.ts
acceptOnlyEmptyObject
called by 12
src/050-the-weird-parts/151-truly-empty-object.problem.ts
acceptOnlyEmptyObject
called by 12
src/050-the-weird-parts/151-truly-empty-object.solution.2.ts
acceptOnlyEmptyObject
called by 12
src/050-the-weird-parts/151-truly-empty-object.solution.1.ts
acceptAllNonPrimitiveTypes
called by 11
src/020-objects/086.5-object-type.explainer.ts
acceptAnythingExceptNullOrUndefined
called by 11
src/050-the-weird-parts/150-empty-object-type.problem.ts
acceptAnythingExceptNullOrUndefined
called by 11
src/050-the-weird-parts/150-empty-object-type.solution.ts

Shape

Function 339
Method 66
Interface 60
Class 56
Enum 9

Languages

TypeScript100%

Modules by API surface

src/030-classes/114-extending-other-classes.solution.ts12 symbols
src/030-classes/114-extending-other-classes.problem.ts9 symbols
book-content/formatter/format.ts9 symbols
src/030-classes/115-implementing-interfaces-or-types.solution.2.ts7 symbols
src/030-classes/115-implementing-interfaces-or-types.solution.1.ts6 symbols
src/030-classes/115-implementing-interfaces-or-types.problem.ts6 symbols
src/032-typescript-only-features/117-parameter-properties.explainer.ts5 symbols
src/030-classes/113-setters.solution.ts5 symbols
src/030-classes/113-setters.problem.ts5 symbols
src/030-classes/112-public-and-private-properties.solution.2.ts5 symbols
src/030-classes/112-public-and-private-properties.solution.1.ts5 symbols
src/030-classes/112-public-and-private-properties.problem.ts5 symbols

Dependencies from manifests, versioned

@tanstack/react-query4.29.12 · 1×
@total-typescript/exercise-cli0.5.1 · 1×
@total-typescript/helpers0.0.1 · 1×
@total-typescript/ts-reset0.5.1 · 1×
@types/diff5.0.4 · 1×
@types/express4.17.13 · 1×
@types/node20.14.2 · 1×
@types/react18.2.8 · 1×
@types/react-dom18.2.4 · 1×
cross-fetch3.1.5 · 1×
diff5.1.0 · 1×
express4.18.1 · 1×

For agents

$ claude mcp add total-typescript-book \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact