Skip to content
New issue

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

feat(fsm): rewrite state machine #923

Merged
merged 85 commits into from
Mar 17, 2023
Merged

feat(fsm): rewrite state machine #923

merged 85 commits into from
Mar 17, 2023

Conversation

alimd
Copy link
Member

@alimd alimd commented Mar 8, 2023

No description provided.

@alimd alimd added the new-feature New features or options. label Mar 8, 2023
@alimd alimd self-assigned this Mar 8, 2023
uniquely/com-pwa/src/ui/page/new-order.ts Fixed Show fixed Hide fixed
core/fsm/src/type.ts Fixed Show fixed Hide fixed
uniquely/com-pwa/src/ui/page/new-order.ts Fixed Show fixed Hide fixed

'detail': () => {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const order = this._stateMachine.context.orderStorage!.data[this._stateMachine.context.orderId!];

Check warning

Code scanning / ESLint

Disallow non-null assertions using the `!` postfix operator

Forbidden non-null assertion.

'detail': () => {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const order = this._stateMachine.context.orderStorage!.data[this._stateMachine.context.orderId!];

Check warning

Code scanning / ESLint

Disallow non-null assertions using the `!` postfix operator

Forbidden non-null assertion.

tracking: () => {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const order = this._stateMachine.context.orderStorage!.data[this._stateMachine.context.orderId!];

Check warning

Code scanning / ESLint

Disallow non-null assertions using the `!` postfix operator

Forbidden non-null assertion.

tracking: () => {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const order = this._stateMachine.context.orderStorage!.data[this._stateMachine.context.orderId!];

Check warning

Code scanning / ESLint

Disallow non-null assertions using the `!` postfix operator

Forbidden non-null assertion.
@alimd alimd force-pushed the feat/fsm branch 2 times, most recently from 843b5f8 to b482696 Compare March 16, 2023 00:12
Comment on lines +331 to +350
export const finiteStateMachineConsumer = <T extends FsmTypeHelper, TContext extends T['TContext'] = T['TContext']>(
instanceId: string,
makeFromConstructor?: string,
) => {

Check failure

Code scanning / ESLint

Require explicit return types on functions and class methods

Missing return type on function.
test3: test3.bind(null, id),
} as const);

function test_bind(): void {

Check failure

Code scanning / ESLint

Enforce camelcase naming convention

Identifier 'test_bind' is not in camel case.
core/fsm/src/type.ts Fixed Show fixed Hide fixed
@alimd alimd force-pushed the feat/fsm branch 4 times, most recently from bb552b6 to 16dc2e0 Compare March 16, 2023 20:25
let userListRecord: Record<string, Record<string, string>> = {};
let userListMap = new Map<string, Map<string, string>>();

function test_make_map() {

Check failure

Code scanning / ESLint

Require explicit return types on functions and class methods

Missing return type on function.
let userListRecord: Record<string, Record<string, string>> = {};
let userListMap = new Map<string, Map<string, string>>();

function test_make_map() {

Check failure

Code scanning / ESLint

Enforce camelcase naming convention

Identifier 'test_make_map' is not in camel case.
}
}

function test_make_obj() {

Check failure

Code scanning / ESLint

Require explicit return types on functions and class methods

Missing return type on function.
}
}

function test_make_obj() {

Check failure

Code scanning / ESLint

Enforce camelcase naming convention

Identifier 'test_make_obj' is not in camel case.
}
}

function test_access_map() {

Check failure

Code scanning / ESLint

Require explicit return types on functions and class methods

Missing return type on function.
}
}

function test_access_map() {

Check failure

Code scanning / ESLint

Enforce camelcase naming convention

Identifier 'test_access_map' is not in camel case.
if (userListMap.get('user_' + size / 2)!.get('user') !== 'user_' + size / 2) throw new Error('not_match');
}

function test_access_obj() {

Check failure

Code scanning / ESLint

Require explicit return types on functions and class methods

Missing return type on function.
if (userListMap.get('user_' + size / 2)!.get('user') !== 'user_' + size / 2) throw new Error('not_match');
}

function test_access_obj() {

Check failure

Code scanning / ESLint

Enforce camelcase naming convention

Identifier 'test_access_obj' is not in camel case.
core/fsm/src/type.ts Fixed Show fixed Hide fixed
}

function test_access_map() {
if (userListMap.get('user_' + size / 2)!.get('user') !== 'user_' + size / 2) throw new Error('not_match');

Check warning

Code scanning / ESLint

Disallow non-null assertions using the `!` postfix operator

Forbidden non-null assertion.
}
| {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
callback: (detail: any, fsmInstance: FsmConsumerInterface<T>) => void;

Check warning

Code scanning / ESLint

Disallow the `any` type

Unexpected any. Specify a different type.
@alimd alimd force-pushed the feat/fsm branch 2 times, most recently from 42ceb4a to 42b131e Compare March 17, 2023 12:08
alimd and others added 26 commits March 17, 2023 15:40
Co-authored-by: Mohammad Honarvar <honarvar.info@gmail.com>
Co-authored-by: Mohammad Honarvar <honarvar.info@gmail.com>
Co-authored-by: Mohammad Honarvar <honarvar.info@gmail.com>
Co-authored-by: Mohammad Honarvar <honarvar.info@gmail.com>
Co-authored-by: Mohammad Honarvar <honarvar.info@gmail.com>
Co-authored-by: Mohammad Honarvar <honarvar.info@gmail.com>
Co-authored-by: Mohammad Honarvar <honarvar.info@gmail.com>
Co-authored-by: Mohammad Honarvar <honarvar.info@gmail.com>
Co-authored-by: Mohammad Honarvar <honarvar.info@gmail.com>
Co-authored-by: Mohammad Honarvar <honarvar.info@gmail.com>
Co-authored-by: Mohammad Honarvar <honarvar.info@gmail.com>
Co-authored-by: Mohammad Honarvar <honarvar.info@gmail.com>
Co-authored-by: Mohammad Honarvar <honarvar.info@gmail.com>
Co-authored-by: Mohammad Honarvar <honarvar.info@gmail.com>
Co-authored-by: Mohammad Honarvar <honarvar.info@gmail.com>
Co-authored-by: Mohammad Honarvar <honarvar.info@gmail.com>
Co-authored-by: Mohammad Honarvar <honarvar.info@gmail.com>
Co-authored-by: Mohammad Honarvar <honarvar.info@gmail.com>
Co-authored-by: Mohammad Honarvar <honarvar.info@gmail.com>
Co-authored-by: Mohammad Honarvar <honarvar.info@gmail.com>
Co-authored-by: Mohammad Honarvar <honarvar.info@gmail.com>
@alimd alimd merged commit 9577832 into next Mar 17, 2023
@alimd alimd deleted the feat/fsm branch March 17, 2023 12:22
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
new-feature New features or options.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants