Skip to content

vue-template-compiler module types do not express the correct optional properties #10812

Open
@emensch

Description

@emensch

Version

2.6.10

Reproduction link

https://codesandbox.io/s/vue-template-compiler-module-type-bug-wl0wn

Steps to reproduce

Issue is surfaced by CodeSandbox' typescript linter - just load the sandbox.

What is expected?

vue-template-compiler should accept modules with 0 or more of the following properties:

  • preTransformNode
  • transformNode
  • postTransformNode
  • genData

What is actually happening?

vue-template-compiler requires modules to have all transform functions and genData defined.

codesandbox typescript error


Ran into this while developing a custom template compiler module. It doesn't effect output or compiler functionality in any way, but it does impact developer experience.

Fixed by #10743

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions