We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
| null
When appending a link to a typescript type with | null included, plop borks the remaining conditional types in the type definition.
Action:
{ type: 'append', path: 'src/context/AsyncStorage/AsyncStorage.context.types.tsx', pattern: `/* PLOP_INJECT_ASYNC_STORAGE_VALUE_TYPE */`, template: `{{camelCase name}}: {{type}} | null;`, },
expected behavior:
export type AsyncStorageContextValues = { /* PLOP_INJECT_ASYNC_STORAGE_VALUE_TYPE */ value1 = Type | null; value2 = Type | null; ... }
Observed behavior:
export type AsyncStorageContextValues = { /* PLOP_INJECT_ASYNC_STORAGE_VALUE_TYPE */ value1 = Type | null; value2 = Type | value3 = Type | ... }
The text was updated successfully, but these errors were encountered:
It looks like this is due to:
https://github.com/plopjs/plop/blob/main/packages/node-plop/src/actions/append.js
This line does not handle the "|" (or) operator in Regex even though we need to be able to plop types into typescript.
const lastPartWithoutDuplicates = lastPart.replace( new RegExp(separator + stringToAppend, "g"), "" );
Sorry, something went wrong.
No branches or pull requests
When appending a link to a typescript type with
| null
included, plop borks the remaining conditional types in the type definition.Action:
expected behavior:
Observed behavior:
The text was updated successfully, but these errors were encountered: