Socket
Socket
Sign inDemoInstall

macroable

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

macroable - npm Package Compare versions

Comparing version 6.0.3 to 6.0.4

6

build/index.d.ts

@@ -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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc