Skip to content

chore(schema-compiler): More defined types #9785

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Jul 17, 2025
Prev Previous commit
Next Next commit
more types
  • Loading branch information
KSDaemon committed Jul 16, 2025
commit 573189f65cbc57e69c8db273d3ec7306fad58dd5
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import type { ErrorReporter } from './ErrorReporter';

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

interface CubeDefinition {
export interface CubeDefinition {
name: string;
extends?: (...args: Array<unknown>) => { __cubeName: string };
sql?: string | (() => string);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Joi from 'joi';
import cronParser from 'cron-parser';

import type { CubeSymbols } from './CubeSymbols';
import type { CubeSymbols, CubeDefinition } from './CubeSymbols';
import type { ErrorReporter } from './ErrorReporter';

/* *****************************
Expand Down Expand Up @@ -952,13 +952,13 @@ export class CubeValidator {
if (result.error != null) {
errorReporter.error(formatErrorMessage(result.error), result.error);
} else {
this.validCubes[cube.name] = true;
this.validCubes.set(cube.name, true);
}

return result;
}

public isCubeValid(cube) {
return this.validCubes[cube.name] || cube.isSplitView;
public isCubeValid(cube: CubeDefinition): boolean {
return this.validCubes.get(cube.name) ?? cube.isSplitView ?? false;
}
}
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy