Skip to content

noPropertyAccessFromIndexSignature=true causes compilation errors on <slot/> tags. #350

Closed
@WillAvudim

Description

@WillAvudim

If tsconfig.json contains

{
  "compilerOptions": {
    "noPropertyAccessFromIndexSignature": true,
  }
}

Then any <slot/> tag anywhere in the <template> section causes typescript compilation errors:

test.vue:17:6 - error TS4111: Property 'slot' comes from an index signature, so it must be accessed with ['slot'].
17 <slot />

Reproducible in both vscode UI and via "vue-tsc --noEmit".

Activity

WillAvudim

WillAvudim commented on Aug 8, 2021

@WillAvudim
Author

You are the God! Please live forever.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      noPropertyAccessFromIndexSignature=true causes compilation errors on <slot/> tags. · Issue #350 · vuejs/language-tools