js-slang
Version:
Javascript-based implementations of Source, written in Typescript
12 lines (11 loc) • 528 B
TypeScript
import type { IfStatement } from 'estree';
import type { Rule } from '../../types';
import { RuleError } from '../../errors';
export declare class BracesAroundIfElseError extends RuleError<IfStatement> {
private readonly branch;
constructor(node: IfStatement, branch: 'consequent' | 'alternate');
explain(): "Missing curly braces around \"if\" block." | "Missing curly braces around \"else\" block.";
elaborate(): string;
}
declare const bracesAroundIfElse: Rule<IfStatement>;
export default bracesAroundIfElse;