Comparing version 6.0.3 to 6.0.4
@@ -43,3 +43,3 @@ /** | ||
}; | ||
constructor(..._: any[]); | ||
constructor(); | ||
/** | ||
@@ -58,3 +58,3 @@ * Add a macro to the class. This method is a better to manually adding | ||
*/ | ||
static macro<T extends typeof Macroable, K extends string>(this: T, name: string, callback: GetMacroFn<InstanceType<T>, K>): void; | ||
static macro<T extends any>(name: string, callback: MacroFn<T, any[], any>): void; | ||
/** | ||
@@ -88,3 +88,3 @@ * Return the existing macro or null if it doesn't exists | ||
*/ | ||
static getter<T extends typeof Macroable, K extends string>(this: T, name: string, callback: GetGetterFn<InstanceType<T>, K>, singleton?: boolean): void; | ||
static getter<T extends any = any>(name: string, callback: GetterFn<T, any>, singleton?: boolean): void; | ||
/** | ||
@@ -91,0 +91,0 @@ * Return the existing getter or null if it doesn't exists |
@@ -22,3 +22,3 @@ "use strict"; | ||
class Macroable { | ||
constructor(..._) { | ||
constructor() { | ||
if (!this.constructor['macros'] || !this.constructor['getters']) { | ||
@@ -25,0 +25,0 @@ throw new Error('Set static properties "macros = {}" and "getters = {}" on the class for the macroable to work.'); |
{ | ||
"name": "macroable", | ||
"version": "6.0.3", | ||
"version": "6.0.4", | ||
"description": "A simple ES6 class that can be extended to provide macros and getters functionality", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13302