'Vue 3 (Typescript + Class Components + Composition API): How do define Props in the Setup method

When using the Composition API with Class Components in Vue 3 and when using Typescript, how can properties be defined in the setup method? For example:

export default class Test extends Vue {
    myAContext = setup(()=> {...})
    myBContext = setup(()=> {...})
} 

In this code, I do not want to use the Options attribute, and neither would I like to use the @Prop attribute that comes in the vue-property-decorators package as I believe they are part of the Options API and I think it would not be a good practice to mix these two APIs together.

Correct me if I am wrong.

Edit: To better clarify, how can I define Props that are scoped to the context (setup method lambda)?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source