Skip to content

Commit

Permalink
Rename decorator to Mixin
Browse files Browse the repository at this point in the history
  • Loading branch information
aedart committed Feb 7, 2024
1 parent 212965d commit c6fdc80
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import { DeDupe } from "./DeDupe";
/**
* Decorates given mixin to add deduplication, application caching, and instance of support
*
* @param {PrepareMixin} mixin
* @param {Mixin} mixin
*
* @returns {PrepareMixin}
* @returns {Mixin}
*/
export const PrepareMixin = function(mixin: MixinFunction): MixinFunction
export const Mixin = function(mixin: MixinFunction): MixinFunction
{
// The following source code is an adaptation of Justin Fagnani's "mixwith.js" (Apache License 2.0)
// @see https://github.com/justinfagnani/mixwith.js
Expand Down
2 changes: 1 addition & 1 deletion packages/support/src/mixins/decorators/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ export * from './Bare';
export * from './Cached';
export * from './DeDupe';
export * from './HasInstance';
export * from './PrepareMixin';
export * from './Mixin';
4 changes: 2 additions & 2 deletions packages/support/src/mixins/mix.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { MixinFunction } from "@aedart/contracts/support/mixins";
import { PrepareMixin } from './decorators';
import { Mixin } from './decorators';

/**
* Mix target class with one or more Abstract subclasses ("Mixins")
Expand Down Expand Up @@ -66,7 +66,7 @@ function prepare(mixin: MixinFunction): MixinFunction
{
// TODO: This SHOULD perhaps allow for customisation?

return PrepareMixin(mixin);
return Mixin(mixin);
}

/**
Expand Down

0 comments on commit c6fdc80

Please sign in to comment.