plop: TypeScript typing for ActionConfig missing `stripExtensions` (2.7.0)

Hi,

I think there are some misalignment with the new typings versus in the documentation which serves as the source of truth. This is my existing code

import { AddManyActionConfig } from 'plop';

export const useAddManyAction = (): AddManyActionConfig => ({
  type: 'addMany',
  base: '',
  templateFiles: '',
  path: '',
  destination: '',
  stripExtensions: ['hbs'],
  globOptions: {
    dot: true
  },
});

Then when I installed the latest version 2.7.0 - the typing definition got changed and a lot of things went being required. But, on the website, it is still optional. Can you please give us some migration notes or updates on the release? Thank you.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 15 (15 by maintainers)

Most upvoted comments

@FDiskas you can send us a code example as text. Saying “I can’t” isn’t going to fly since you already send a screenshot.

If you are unwilling to do that, then you should rename your plopfile to .js or otherwise disable typechecking. You can Google for // @ts-nocheck or use type assertions to accomplish this. This is obviously not ideal; it would be better for you to send us a code example as text so we can identify and fix the issue you are encountering.

I stand by my views that this codebase does not need to be in TS. Further, I don’t think we need to move the typings. I’ll make a PR to have this fixed