Let Your Angular Code Write Itself
summary
Live-coding shows how to use the TypeScript AST and TS query to find and edit code: a tool is built that queries for console.log calls inside class methods and replaces them with AwesomeLoggingService.logInfo, tested with Jest and Wallaby and fixed ordering bugs by reversing matches. Demonstrations include running a TSQuery search across ~1M GitHub files, using schematics to generate modules, and a type with integration that infers runtime types and writes number/string/boolean annotations back into source successfully.
AI-written summary · about
chapters (6)
- 0:00Angular CLI and schematics
- 6:23Understanding AST
- 8:55TS Query basics
- 14:29Querying code on GitHub
- 17:12Live refactoring demo
- 30:45Type-with tool and conclusion
related talks
24mStatic Analysis and Source Code Manipulation in TypeScript
54mDiving into TypeScript
48mDeep Dive into Advanced TypeScript: A Live Coding Expedition
59mA Deep Dive into Advanced TypeScript: A Live Coding Expedition
33mHidden Gems of TypeScript compiler
50mTypescript 2 and failing faster
44mA Deep Dive Into Advanced TypeScript: A Live-Coding Expedition
05mLightning talk from John Wargo
