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
XState version 5
A number of these type tests fail typescript validation
it('should allow mixed guard patterns with logical guard operators', () => { setup({ types: {} as { events: { type: 'TEST' }; }, guards: { paramGuard: (_, _arg: number) => true, plainGuard: () => true } }).createMachine({ states: { plainAnd: { on: { TEST: { guard: and(['plainGuard', 'plainGuard']) } } }, plainAndWithObjects: { on: { TEST: { guard: and([{ type: 'plainGuard' }, { type: 'plainGuard' }]) } } }, plainAndWithMixed: { on: { TEST: { guard: and(['plainGuard', { type: 'plainGuard' }]) } } }, // ! Failing parameterizedAnd: { on: { TEST: { guard: and([ { type: 'paramGuard', params: () => 1 }, { type: 'paramGuard', params: () => 1 } ]) } } }, // ! Failing plainAndParameterizedAnd: { on: { TEST: { guard: and([ { type: 'plainGuard' }, { type: 'paramGuard', params: () => 1 } ]) } } }, plainNot: { on: { TEST: { guard: not('plainGuard') } } }, // ! Failing parameterizedNot: { on: { TEST: { guard: not({ type: 'paramGuard', params: () => 1 }) } } }, plainComposedAndNot: { on: { TEST: { guard: and([{ type: 'plainGuard' }, not('plainGuard')]) } } }, // ! Failing parameterizedComposedAndNot: { on: { TEST: { guard: and([ { type: 'paramGuard', params: () => 1 }, not({ type: 'paramGuard', params: () => 1 }) ]) } } } } }); });
This state machine to pass type validation based on the fact they seem to be supported in code.
parameterizedAnd, plainAndParameterizedAnd, parameterizedNot, and parameterizedComposedAndNot do not pass typescript evaluation
parameterizedAnd
plainAndParameterizedAnd
parameterizedNot
parameterizedComposedAndNot
https://codesandbox.io/p/sandbox/vigorous-minsky-rl75h2?file=%2Fmachine.ts%3A6%2C7
I included a link but this is much easier to see when added to `/packages/core/
The text was updated successfully, but these errors were encountered:
Andarist
No branches or pull requests
XState version
XState version 5
Description
A number of these type tests fail typescript validation
Expected result
This state machine to pass type validation based on the fact they seem to be supported in code.
Actual result
parameterizedAnd
,plainAndParameterizedAnd
,parameterizedNot
, andparameterizedComposedAndNot
do not pass typescript evaluationReproduction
https://codesandbox.io/p/sandbox/vigorous-minsky-rl75h2?file=%2Fmachine.ts%3A6%2C7
Additional context
I included a link but this is much easier to see when added to `/packages/core/
The text was updated successfully, but these errors were encountered: