import { STMessage } from "./STMessage"; /** * A Smalltalk object that can receive messages. * Responds with nil to every message by default. * * To ensure universal availability of standard methods * (equals, ...), you should NEVER inherit from STObject * directly. ALWAYS inherit from STObjectBase instead, unless * you have a very good reason not to. */ export declare class STObject { static universalMethodHandler: (receiver: STObject, message: STMessage) => STObject; receiveMessage(message: STMessage): STObject; receiveMessageSilently(message: STMessage): STObject; protected doesNotUnderstand(message: STMessage): STObject; protected handleMessage(message: STMessage): STObject; onAssignTo(name: string): void; getClassName(): string; /** * Dynamically casts this Smalltalk object while * catching type errors at runtime. * * @param castedType - The resulting type */ expect(castedType: { new (...args: any[]): T; }): T; /** * Safely executes a block of code if this Smalltalk * object can be dynamically converted to a given type. * * Returns itself for convenient method chaining. * * @param castedType - The casted type * @param then - The callback function */ whenMatches(castedType: { new (...args: any[]): T; }, then: (obj: T) => void): this; isNil(): boolean; orIfNil(other: STObject): STObject; toString(): string; }