~/talk

JavaScript Tools at Scale Using Type Information

Talkat JSConf EU 2014 · 2014-09-13..09-14· [javascript, developer-experience]
links:none on file
slides:none on file

A set of tools uses declared and inferred types to find and change real code patterns at scale: RefasterJS rewrites direct assignments like location.href into calls to goog.dom.safe, running across large repositories in minutes (mapreduce over hundreds/thousands/millions of files) and preventing XSS by construction; a closure compiler conformance layer emits compiler errors for banned idioms. It works reliably when type info exists but yields false positives where inference is weak.

AI-written summary · about

  1. 0:00Start
  2. 0:44JavaScript Lines of Code at Google
  3. 2:07RefasterJS
  4. 2:48Running Example
  5. 7:25Build AST
  6. 9:15Matching AST structures
  7. 9:321. Match just node structure
  8. 10:17Match node structure and name
  9. 11:52Match node structure, name, or JS type
  10. 16:39Limitations - Missing Type information
  11. 18:26JS Conformance Framework
  12. 20:06Conformance Types
  13. 20:24Another example
~/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.