Skip to content

Commit

Permalink
Add types
Browse files Browse the repository at this point in the history
  • Loading branch information
kanitw committed Feb 9, 2019
1 parent 8c9d356 commit 989d524
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/compositemark/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
import * as log from '../log';
import {ColorMixins, GenericMarkDef, isMarkDef, Mark, MarkConfig, MarkDef} from '../mark';
import {GenericUnitSpec, NormalizedUnitSpec} from '../spec';
import {StandardType} from '../type';
import {Orient} from '../vega.schema';

export type PartsMixins<P extends string> = Partial<Record<P, boolean | MarkConfig>>;
Expand Down Expand Up @@ -153,7 +154,13 @@ export function compositeMarkContinuousAxis<M extends CompositeMark>(
spec: GenericUnitSpec<Encoding<string>, CompositeMark | CompositeMarkDef>,
orient: Orient,
compositeMark: M
) {
): {
continuousAxisChannelDef: PositionFieldDef<string>;
continuousAxisChannelDef2: SecondaryFieldDef<string>;
continuousAxisChannelDefError: FieldDefWithoutScale<string, StandardType>;
continuousAxisChannelDefError2: FieldDefWithoutScale<string, StandardType>;
continuousAxis: 'x' | 'y';
} {
const {encoding} = spec;
const continuousAxis: 'x' | 'y' = orient === 'vertical' ? 'y' : 'x';

Expand Down

0 comments on commit 989d524

Please sign in to comment.