Not assignment error with Vue 3, Teleport, TypeScript, and Composition API

I’ve built some components using Vue 3, TypeScript, and the Composition API, but I keep getting errors when trying to build in production. This is one of the errors:

ERROR in <root>/resources/ts/components/CancelSubscriptionButton.vue.ts
[tsl] ERROR in <root>/resources/ts/components/CancelSubscriptionButton.vue.ts(21,33)
      TS2345: Argument of type '{ new (): { $props: VNodeProps & TeleportProps; }; __isTeleport: true; }' is not assignable to parameter of type 'VNodeTypes | ClassComponent'.
  Type '{ new (): { $props: VNodeProps & TeleportProps; }; __isTeleport: true; }' is not assignable to type 'ComponentPublicInstanceConstructor<any, any, any, any, ComputedOptions, MethodOptions>'.
    Types of property '__isTeleport' are incompatible.
      Type 'true' is not assignable to type 'undefined'.

This is the component:

    <button class="btn btn-outline-danger btn-sm" type="button" v-bind="$attrs" v-on:click="cancelSubscription">
            <span lang="en">Cancel</span>
        <teleport to="#modals">
                v-on:hide="showModal = false"

<script lang="ts">
import { defineComponent, ref } from 'vue';
import CancelSubscriptionModal from './CancelSubscriptionModal.vue';

export default defineComponent({
    components: {
    inheritAttrs: false,
    props: {
        url: {
            required: true,
            type: String,
    setup() {
        const showModal = ref(false);

        const cancelSubscription = () => {
            showModal.value = true;

        const onCancelled = () => {

        return {

I don’t really know what it’s complaining about. Something to do with the teleport, but it’s as per the example in the docs.

Has any one encountered similar errors using Vue 3 and TypeScript?

Seems this is an open issue: