testing: remove `data` from TestItems
Data was viral and spread generics all over the place. It was also hard to type correctly and consistently, which ended up in the type being `any` unless great care was taken. This removes the `data`. Instead, consumers can use a `WeakMap<TestItem, T>` to keep data associated with the test item. This is a similar pattern to what is used to store data about documents and debug sessions, for example. Here's an example of a migration: https://github.com/microsoft/vscode-extension-samples/commit/8fdf822985243c42aa7ed922a9a6c1fc5540c478#diff-2fe3ad6ad19447c57c5db14c5a6ccb5544944494db6b909540d70ea499784b49R9
Showing
想要评论请 注册 或 登录