Skip to content

Types problem when using <script setup> alongside normal <script> since v1.8.14 #3612

@Yizack

Description

@Yizack

Hello, I have a types problem in vue projects where <script setup> is being used alongside the normal <script>. Since v1.8.14 and v1.8.15, property types inside the normal <script> aren't being recognized. Before v1.8.14 using both at the same time used to work without any problem and properties were all recognized, I don't know if the changes in recent versions broke something or if this is intended to encourage not using both definitions. I'll be looking forward to your response thanks <3

image

And when removing <script setup> the problem disappears
image

Example code:

<script setup lang="ts">
// some code
</script>

<template>
  {{ hello_world }}
</template>

<script lang="ts">
export default {
  data () {
    return {
      hello_world: "Hello World!"
    };
  }
};
</script>

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already existsgood reproduction ✨This issue provides a good reproduction, we will be able to investigate it first

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions