~/talk

Static Analysis and Source Code Manipulation in TypeScript

Talkat TSConf 2018 · on Monday, 2018-03-12· [typescript]
slides:none on file

Uses the TypeScript compiler API to parse source with createSourceFile and then runs concrete scripts: a checker that lists class declarations with an extends clause, a refactor that renames classes to snake_case across thousands of files using a TS simple ast wrapper that edits text and calls the language service rename, and a generator that inserts 150 method overloads into declaration files. The refactor updates identifiers and module specifiers, saves transactionally, and demonstrates the AST viewer at TS AST Viacom.

AI-written summary · about

  1. 0:00Start
  2. 0:48Abstract Syntax Trees
  3. 3:09Typescript Compiler
  4. 3:38The Typescript Compiler Api
  5. 5:38Static Analysis
  6. 6:43Ts Simple Ast
  7. 9:56Example of Static Analysis
  8. 13:05Programmatic Refactor
  9. 14:41Rename the Source File
  10. 20:04Use Cases for a Static Analysis and Source Code Manipulation
  11. 20:39Automated Enforcement of Api Conformance
  12. 21:24Documentation Generation from Source Code
  13. 21:44Metrics on Code Complexity
  14. 22:37Source Code Transformations between Javascript and Typescript
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.