Conversation
|
Pipeline Attempt on 15012020916 for d818b83 https://github.com/MatrixAI/js-async-locks/actions/runs/15012020916 |
|
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. The return signature of
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? |
…ith void LockBox and Monitor because we only care about side effects
Fix up linting errors found by the new js-lint
|
Pipeline Attempt on 15013745767 for 64ca8f4 https://github.com/MatrixAI/js-async-locks/actions/runs/15013745767 |
|
Pipeline Succeeded on 15013745767 for 64ca8f4 https://github.com/MatrixAI/js-async-locks/actions/runs/15013745767 |
This is an automatic PR generated by the CI/CD pipeline. This will be automatically fast-forward merged if successful.