Skip to content

writeFiles operation does not follow types. #27356

Open
@mshima

Description

@mshima
Overview of the issue

writeFiles operation has a lot a legacy code inherited from writeFileFromDisk.
It needs to be re-implemented following typed parameters.

Reproduce the error
  • ✅ :
this.writeFiles({
  blocks: [
    {
      templates: [
        { sourceFile: data => data.applicationTypeFoo ? 'file_foo.ts' : 'file_bar.ts' },
      ],
    },
  ],
  context: application,
});
  • ❌ :
this.writeFiles({
  templates: [
    { sourceFile: data => data.applicationTypeFoo ? 'file_foo.ts' : 'file_bar.ts' },
  ],
  context: application,
});
Related issues
Suggest a Fix
JHipster Version(s)
Browsers and Operating System
  • Checking this box is mandatory (this is just to show you read everything)

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