What is @statoscope/types?
@statoscope/types is a TypeScript definitions package for Statoscope, a tool for analyzing and visualizing webpack bundle statistics. It provides type definitions for various Statoscope data structures, making it easier to work with Statoscope's API in a type-safe manner.
What are @statoscope/types's main functionalities?
Type Definitions for Statoscope Reports
This feature provides type definitions for creating and manipulating Statoscope reports. The code sample demonstrates how to define a basic report object using the provided types.
import { Report } from '@statoscope/types';
const report: Report = {
version: '1.0.0',
name: 'My Report',
data: [],
sections: []
};
console.log(report);
Type Definitions for Statoscope Data
This feature provides type definitions for Statoscope data structures. The code sample shows how to define a simple data object using the provided types.
import { Data } from '@statoscope/types';
const data: Data = {
name: 'My Data',
value: 42
};
console.log(data);
Type Definitions for Statoscope Sections
This feature provides type definitions for Statoscope sections. The code sample demonstrates how to define a section object using the provided types.
import { Section } from '@statoscope/types';
const section: Section = {
name: 'My Section',
data: []
};
console.log(section);
Other packages similar to @statoscope/types
webpack-bundle-analyzer
webpack-bundle-analyzer is a tool that visualizes the size of webpack output files with an interactive zoomable treemap. It provides a similar functionality to Statoscope in terms of analyzing webpack bundles, but it focuses more on visualizing the size and composition of the bundles rather than providing type definitions.
source-map-explorer
source-map-explorer analyzes JavaScript bundles using source maps to determine which file each byte in the minified output came from. It provides insights into the composition of the bundles, similar to Statoscope, but it does not offer type definitions for TypeScript.
bundle-stats
bundle-stats is a tool that generates bundle report files and provides a UI to compare different builds. It offers similar functionalities to Statoscope in terms of analyzing and comparing webpack bundles, but it does not provide TypeScript type definitions.