A weird typescript problem, anyone help? #6145
              
                
                  
                  
                    Answered
                  
                  by
                    lvjiaxuan
                  
              
          
                  
                    
                      lvjiaxuan
                    
                  
                
                  asked this question in
                Help/Questions
              
            -
| Just like this, a simple normal vue file. How can I solve this problem?↓↓↓ crycry~ | 
Beta Was this translation helpful? Give feedback.
      
      
          Answered by
          
            lvjiaxuan
          
      
      
        Jun 20, 2022 
      
    
    Replies: 3 comments 2 replies
-
| You can use like this Example, Hope this helps you. TsTs.vue <script setup lang="ts">
import {ref} from 'vue'
const foo = ref('foo')
</script>
<template>
<main>
  hello, world
  <slot :name="foo"/>
</main>
</template> | 
Beta Was this translation helpful? Give feedback.
                  
                    1 reply
                  
                
            -
| I found that  | 
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
      Answer selected by
        lvjiaxuan
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    


I found that
options APIis ok, as my workaround.