Skip to content

Commit

Permalink
fix: fix type of ScaleSpec
Browse files Browse the repository at this point in the history
  • Loading branch information
xile611 committed Aug 25, 2023
1 parent 3a0be03 commit b5a3e27
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/vgrammar/src/types/scale.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,13 @@ export interface ThresholdScaleSpec extends BaseScaleSpec {
range?: ScaleFunctionType<any[]> | ScaleData | MultiScaleData;
}

/**
* the threshold scale
*/
export interface IdentityScaleSpec extends BaseScaleSpec {
type: 'identity';
}

export type ScaleSpec =
| OrdinalScaleSpec
| BandScaleSpec
Expand All @@ -152,6 +159,7 @@ export type ScaleSpec =
| UtcTimeScaleSpec
| QuantizeScaleSpec
| QuantileScaleSpec
| ThresholdScaleSpec;
| ThresholdScaleSpec
| IdentityScaleSpec;

export type ScaleConfigureSpec = DistributiveOmit<ScaleSpec, 'type'>;

0 comments on commit b5a3e27

Please sign in to comment.