Skip to content

Commit 327362c

Browse files
committed
some types specified (CompilerInterface)
1 parent 8631d2c commit 327362c

File tree

5 files changed

+11
-9
lines changed

5 files changed

+11
-9
lines changed

packages/cubejs-schema-compiler/src/compiler/CubeDictionary.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import type { ErrorReporter } from './ErrorReporter';
22
import { TranspilerCubeResolver } from './transpilers';
3+
import { CompilerInterface } from './PrepareCompiler';
34

45
export interface Cube {
56
name: string;
67
[key: string]: any;
78
}
89

9-
export class CubeDictionary implements TranspilerCubeResolver {
10+
export class CubeDictionary implements TranspilerCubeResolver, CompilerInterface {
1011
public byId: Record<string, Cube>;
1112

1213
public constructor() {

packages/cubejs-schema-compiler/src/compiler/CubeSymbols.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { camelizeCube } from './utils';
88

99
import type { ErrorReporter } from './ErrorReporter';
1010
import { TranspilerSymbolResolver } from './transpilers';
11+
import { CompilerInterface } from './PrepareCompiler';
1112

1213
export type ToString = { toString(): string };
1314

@@ -215,7 +216,7 @@ export const CONTEXT_SYMBOLS = {
215216

216217
export const CURRENT_CUBE_CONSTANTS = ['CUBE', 'TABLE'];
217218

218-
export class CubeSymbols implements TranspilerSymbolResolver {
219+
export class CubeSymbols implements TranspilerSymbolResolver, CompilerInterface {
219220
public symbols: Record<string | symbol, CubeSymbolsDefinition>;
220221

221222
private builtCubes: Record<string, CubeDefinitionExtended>;

packages/cubejs-schema-compiler/src/compiler/CubeValidator.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import cronParser from 'cron-parser';
33

44
import type { CubeSymbols, CubeDefinition } from './CubeSymbols';
55
import type { ErrorReporter } from './ErrorReporter';
6+
import { CompilerInterface } from './PrepareCompiler';
67

78
/* *****************************
89
* ATTENTION:
@@ -978,7 +979,7 @@ export function functionFieldsPatterns(): string[] {
978979
return Array.from(functionPatterns);
979980
}
980981

981-
export class CubeValidator {
982+
export class CubeValidator implements CompilerInterface {
982983
protected readonly validCubes: Map<string, boolean> = new Map();
983984

984985
public constructor(

packages/cubejs-schema-compiler/src/compiler/JoinGraph.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import type { CubeValidator } from './CubeValidator';
66
import type { CubeEvaluator, MeasureDefinition } from './CubeEvaluator';
77
import type { CubeDefinition, JoinDefinition } from './CubeSymbols';
88
import type { ErrorReporter } from './ErrorReporter';
9+
import { CompilerInterface } from './PrepareCompiler';
910

1011
export type JoinEdge = {
1112
join: JoinDefinition,
@@ -30,7 +31,7 @@ export type JoinHint = string | string[];
3031

3132
export type JoinHints = JoinHint[];
3233

33-
export class JoinGraph {
34+
export class JoinGraph implements CompilerInterface{
3435
private readonly cubeValidator: CubeValidator;
3536

3637
private readonly cubeEvaluator: CubeEvaluator;

packages/cubejs-schema-compiler/src/compiler/ViewCompilationGate.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
export class ViewCompilationGate {
2-
private shouldCompile: any;
1+
import { CompilerInterface } from './PrepareCompiler';
32

4-
public constructor() {
5-
this.shouldCompile = false;
6-
}
3+
export class ViewCompilationGate implements CompilerInterface {
4+
private shouldCompile: boolean = false;
75

86
public compile(cubes: any[]) {
97
// When developing Data Access Policies feature, we've come across a

0 commit comments

Comments
 (0)