Skip to content

Commit 0429eac

Browse files
committed
Adds table with type extractor.
1 parent dc9b07a commit 0429eac

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

data-extraction/src/js/api/default-extractors/TableExtractor.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,19 @@ export class TableDataExtractor implements DataExtractor {
3434
});
3535
},
3636
});
37+
38+
collector.addExtraction({
39+
id: "table-with-type-name",
40+
name: "Table (With Type Name)",
41+
priority: 950,
42+
extractData() {
43+
return expect<TableVisualizationData>({
44+
kind: {
45+
table: true,
46+
},
47+
rows: data.map(d => ({ type: d.constructor.name, ...d })),
48+
});
49+
},
50+
});
3751
}
3852
}

0 commit comments

Comments
 (0)