Skip to content

Conversation

johnjenkins
Copy link
Contributor

@johnjenkins johnjenkins commented Sep 19, 2025

What is the current behavior?

Devs have no steer regarding the typing of mixin factory functions for use with the new Mixin() utility

GitHub Issue Number: N/A

What is the new behavior?

The MixinFactory type has been exported for devs to use:

import { Method, Prop, type MixinFactory } from '@stencil/core';

export const WithMixinThing: MixinFactory = (Base) => {
  class MixinThing extends Base {
    @Prop() mixinThing = 'mixing ???';

    @Method()
    async mixinMethod() {
      console.log('Mixin method called');
      return 'Mixin method result';
    }
  }
  return MixinThing;
}

Documentation

Does this introduce a breaking change?

  • Yes
  • No

Testing

Other information

@johnjenkins johnjenkins requested a review from a team as a code owner September 19, 2025 19:01
@johnjenkins johnjenkins merged commit a26114e into main Sep 19, 2025
69 checks passed
@johnjenkins johnjenkins deleted the mixin-factory-type branch September 19, 2025 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant