import Class from './class'; import { ClassCaller } from '../../types/pointer'; export default class Pointer { sourceClassName: string; sourceKey: string; classType: typeof Class; parentClassName: string; parentKey: string; private secondaryFlag; /** * Constructor * @param {Class} classType * @param {String} aliasKey */ constructor(classType: typeof Class, sourceClassName: string, sourceKey: string, parentClassName: string, parentKey: string, secondary?: boolean); static isUsedBy(key: string): boolean; static isValid(key: string): boolean; static parseKey(keyName: string): [string, string]; static formatKey(className: string, key: string): string; static formatAsId(key: string): string; statics(): typeof Pointer; readonly class: typeof Class; readonly secondary: boolean; /** * The foreign key inside the current class */ sourceClassKey(className: string): string; /** * The key inside the other class that the foreign key matches */ parentClassKey(): string; isImplementedBy(value: object): boolean; } export declare class PointerDefinition { private classCaller; private sourceClassName; private sourceKey; private parentClassName; private parentKey; static OwnerSymbol: string; constructor(classDefinition: ClassCaller, sourceClassName: string, sourceKey: string, parentClassName: string, parentKey: string); toPointer(): Pointer; } /** * belongsTo decorator for pointers * @param classCaller */ export declare const belongsTo: (classCaller: ClassCaller, from?: string | undefined, to?: string | undefined) => (classInstance: T, name: string) => any;