Skip to content

Commit 46f751b

Browse files
committed
feat(docs): document unused reflection info tracking
1 parent 358908e commit 46f751b

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

TOOLS_DART.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,16 @@ each level. To reduce noise in the output (for very large apps) it also provides
4040
an option to hide libraries that are too small, so you can focus on the biggest
4141
contributors.
4242
43+
#### Track unused reflection data
44+
45+
Call `reflector.trackUsage()` to cause it to track reflection information used
46+
by the application. Reflection information (`ReflectionInfo`) is a data
47+
structure that stores information about your application that Angular uses for
48+
locating DI factories, generated change detectors and other code related to a
49+
given type. After exercising your application, call `reflector.listUnusedKeys()`
50+
to get a list of types and functions whose reflection information was retained
51+
but was never used by the application.
52+
4353
#### Use code coverage to find dead code
4454

4555
When running in Dartium (or in Dart VM in general) you can request code

0 commit comments

Comments
 (0)