@neo4j/cypher-builder
Version:
A programmatic API for building Cypher queries for Neo4j
19 lines (18 loc) • 769 B
TypeScript
type ConstructorType<T> = new (...args: any[]) => T;
type AbstractConstructorType<T> = abstract new (...args: any[]) => T;
/**
* Decorator for mixins. Support for adding mixins into classes
* Based on https://www.typescriptlang.org/docs/handbook/mixins.html
*
* All "Mixin" classes will be inherited by the decorated class. Note that mixin classes must be abstract
* Typings will not automatically be updated, but exporting an interface with the same name will fix typings
*
* @example
* ```ts
* export interface MyClass extends WithName, WithAge
* \@mixin(WithName, WithAge)
* export class MyClass{}
* ```
*/
export declare function mixin(...mixins: AbstractConstructorType<any>[]): (constructor: ConstructorType<any>) => ConstructorType<any>;
export {};