Skip to content

ci: merge staging to master #36

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

Merged
merged 4 commits into from
May 14, 2025
Merged

ci: merge staging to master #36

merged 4 commits into from
May 14, 2025

Conversation

github-actions[bot]
Copy link

This is an automatic PR generated by the CI/CD pipeline. This will be automatically fast-forward merged if successful.

Copy link
Author

@aryanjassal
Copy link
Member

The CI is failing here due to the linting failing the check here.

  public withF<T>(
    ...params: [
      ...(
        | [type?: 'read' | 'write', ctx?: Partial<ContextTimedInput>]
        | [type?: 'read' | 'write']
        | [ctx?: Partial<ContextTimedInput>]
        | []
      ),
      (lock: RWLockReader) => Promise<T>,
    ]
  ): Promise<T> {
    let type: 'read' | 'write';
    if (params.length === 2) {
      type = params.shift() as 'read' | 'write';
    } else {
      if (typeof params[0] === 'string') {
        type = params.shift() as 'read' | 'write';
      } else if (typeof params[0] == null) {  // <<< HERE!
        params.shift();
      }
    }
    type = type! ?? 'write';
    switch (type) {
      case 'read':
        return this.withReadF(...(params as any));
      case 'write':
        return this.withWriteF(...(params as any));
    }
  }

This is the error returned by the linter for this line.

  221:18  error  Unexpected constant binary expression. Compares constantly with the right-hand side of the `==`  no-constant-binary-expression
  221:38  error  Invalid typeof comparison value 

The return signature of typeof is 'string' | 'number' | 'bigint' | 'boolean' | 'symbol' | 'undefined' | 'object' | 'function'. So, what the error is trying to say is that it is a dead branch.

Removing the typeof seems likely actually if the input type was [undefined, ...rest] but that's not an option in the types. [We should] probably just remove that whole branch.
- Brian

As we haven't worked on this codebase directly, we are unsure what the intention behind this was.

@CMCDragonkai how do you propose we fix this?

CDeltakai and others added 3 commits May 14, 2025 15:40
Copy link
Author

Copy link
Author

@maxwell-aiden maxwell-aiden merged commit 64ca8f4 into master May 14, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants