import type { BrsFile } from '../../files/BrsFile'; import type { OnFileValidateEvent } from '../../interfaces'; export declare class BrsFileValidator { event: OnFileValidateEvent; constructor(event: OnFileValidateEvent); process(): void; /** * Walk the full AST */ private walk; /** * Validate that a statement is defined in one of these specific locations * - the root of the AST * - inside a namespace * This is applicable to things like FunctionStatement, ClassStatement, NamespaceStatement, EnumStatement, InterfaceStatement */ private validateDeclarationLocations; private validateFunctionParameterCount; private validateEnumDeclaration; private validateEnumValueTypes; /** * Find statements defined at the top level (or inside a namespace body) that are not allowed to be there */ private flagTopLevelStatements; private validateImportStatements; private validateContinueStatement; /** * Validate that there are no optional chaining operators on the left-hand-side of an assignment, indexed set, or dotted get */ private validateNoOptionalChainingInVarSet; /** * The minimum Roku firmware version that introduced optional chaining support (Roku OS 11). * Optional chaining is NOT transpiled by BrighterScript, so this restriction applies to both * .brs and .bs files. */ private static readonly OPTIONAL_CHAINING_MIN_VERSION; /** * Add a diagnostic if the configured minFirmwareVersion is lower than the version that * introduced optional chaining support (Roku OS 11). * This applies to both .brs and .bs files because optional chaining is not transpiled — * it is emitted as-is, so the target device must natively support it. */ private validateMinFirmwareVersionForOptionalChaining; }