Skip to content
This repository was archived by the owner on Oct 23, 2023. It is now read-only.

vue-tsc --noEmit show error when using slot in vue template #79

Closed
ndh103 opened this issue Oct 2, 2021 · 1 comment
Closed

vue-tsc --noEmit show error when using slot in vue template #79

ndh103 opened this issue Oct 2, 2021 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@ndh103
Copy link

ndh103 commented Oct 2, 2021

Vue Language Features (Volar) version v0.27.27
TypeScript Vue Plugin (Volar) version v0.27.27

vue-tsc show error when I use slot

<v-date-picker v-model="event.eventDate">
        <template #default="{ togglePopover }">
          <div class="flex flex-wrap">
            <button
              class="app-btn-datepicker"
              @click.stop="dateSelected($event, togglePopover)"
            >
              {{ event.eventDate.toLocaleDateString() }}
            </button>
          </div>
        </template>
      </v-date-picker>

with this error in the '#default'


Property 'default' does not exist on type '({} | {}) & ({} | Record<string, any>)'.
  Property 'default' does not exist on type '{}'.ts(2339)

tsconfig.json

{
  "compilerOptions": {
    "target": "esnext",
    "useDefineForClassFields": true,
    "module": "esnext",
    "moduleResolution": "node",
    "strict": true,
    "jsx": "preserve",
    "sourceMap": true,
    "resolveJsonModule": true,
    "esModuleInterop": true,
    "lib": ["esnext", "dom"],
    "strictNullChecks": false,
    "noImplicitAny": false,
    "allowSyntheticDefaultImports": true,
    "skipLibCheck": true,
    "experimentalDecorators": true,
    "importHelpers": true,
    "baseUrl": ".",
    "paths": {
      "@/*": ["./src/*"]
    }
  },
  "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"]
}

@ndh103 ndh103 changed the title vue-tsc --noEmit show error vue-tsc --noEmit show error when using slot in vue template Oct 2, 2021
@ndh103
Copy link
Author

ndh103 commented Oct 3, 2021

Dupplicated with vuejs/language-tools#547

@ndh103 ndh103 closed this as completed Oct 3, 2021
@johnsoncodehk johnsoncodehk added the duplicate This issue or pull request already exists label Oct 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants