Skip to content

Commit

Permalink
refactor: Rename Asset type to AssetMetricRun
Browse files Browse the repository at this point in the history
  • Loading branch information
vio committed Nov 5, 2024
1 parent 49f2b4b commit 30d9a3b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packages/ui/src/components/asset-info/asset-info.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
getBundleAssetsFileTypeComponentLink,
getModuleFileType,
} from '@bundle-stats/utils';
import { Asset, MetaChunk } from '@bundle-stats/utils/types/webpack';
import type { AssetMetricRun, MetaChunk } from '@bundle-stats/utils/types/webpack';

import { FlexStack } from '../../layout/flex-stack';
import { AssetMetaTag } from '../asset-meta-tag';
Expand Down Expand Up @@ -60,7 +60,7 @@ interface AssetInfoProps {
isInitial?: boolean;
isNotPredictive?: boolean;
fileType?: string;
runs: Array<Asset & MetricRunInfo>;
runs: Array<AssetMetricRun & MetricRunInfo>;
};
chunks?: Array<MetaChunk>;
labels: Array<string>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import type { ComponentProps } from 'react';
import React from 'react';
import cx from 'classnames';
import type { Asset } from '@bundle-stats/utils/types/webpack';
import type { AssetMetricRun } from '@bundle-stats/utils/types/webpack';

import { Stack } from '../../layout/stack';
import { Table } from '../../ui/table';
import css from './asset-not-predictive.module.css';

export type AssetNotPredictiveProps = {
runs?: Array<Asset>;
runs?: Array<AssetMetricRun>;
labels?: Array<string>;
} & ComponentProps<'div'>;

Expand Down
4 changes: 2 additions & 2 deletions packages/utils/src/webpack/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ export interface MetaChunk {
name: string;
}

export interface Asset extends MetricRun {
export interface AssetMetricRun extends MetricRun {
name: string;
isEntry: boolean;
isInitial: boolean;
isChunk: boolean;
chunkId?: string;
}

export type Assets = Record<string, Asset>;
export type Assets = Record<string, AssetMetricRun>;

export interface MetricsAssets {
metrics: {
Expand Down

0 comments on commit 30d9a3b

Please sign in to comment.