Repository navigation
Add interview practice deck - #44
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thirteenth and last lesson in my Angular guide: interview prep. The feature slice is a practice deck that drills every interview question in the guide.
What shipped
An interview practice deck (
lessons/interview-practice.ts). All 78 questions from the guide, one at a time:aria-expandedandaria-controls.role="status"line reads "78 left, 0 known".linkedSignalover the filtered cards: changing the topic resets it, and in between it's ordinary writable state.One bank for every lesson's questions (
lessons/interview-bank.ts). They lived inside each lesson component, so the deck could only have reached them by importing all twelve lesson pages into one chunk. Each lesson now reads its own entry.interview-bank.spec.tschecks:Cost: the bank is about 32 kB raw, 12 kB gzipped. It loads with the first lesson opened and is cached after that, while each lesson's own chunk shrank 1.4–2.6 kB. Splitting it per lesson would avoid that, at the price of 13 small data files; I went with one file and the number.
Lesson 13: interview prep (
/thoughts/angular-13-interview).*ngIf,@Input, constructor injection,takeUntil) next to the same component today.@angular/corecollection.selectSignal) and SignalStore, as examples; this site doesn't use NgRx.A fitness-test fix. The no-NgModules check in
architecture.spec.tswas a regex, and it flagged the@NgModuleexample in lesson 13. It now reads real decorators with the TypeScript parser, through the helper the OnPush check already used (generalised to take the decorator name). To confirm it still catches the real thing, I briefly added a file with an actual@NgModuleand it failed withshared/probe.module.ts (ProbeModule). The lesson 13 commit went in before this fix, so that one commit has a red suite.Commits
Verification
ng test --watch=false: 71 files, 511 tests, exit 0npm run lint: exit 0tsc --noEmit -p tsconfig.app.jsonand-p tsconfig.spec.json: exit 0ng build: exit 0, 83 routes prerendered (including/thoughts/tag/interview), initial 395.60 kBTO-DOs for this PR