Skip to content

Fix CI typecheck errors: widen Index generic signatures and handle noUncheckedIndexedAccess#7

Merged
mrjf merged 11 commits intomainfrom
copilot/fix-ci-errors
Apr 4, 2026
Merged

Fix CI typecheck errors: widen Index generic signatures and handle noUncheckedIndexedAccess#7
mrjf merged 11 commits intomainfrom
copilot/fix-ci-errors

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 3, 2026

PR #4 introduced the Index<T> type system but CI fails with 27 typecheck errors across two categories.

Handle undefined from noUncheckedIndexedAccess

Array index access returns T | undefined under strict config. Added explicit undefined checks in isMonotonicIncreasing, isMonotonicDecreasing, and argsort comparators.

Widen method type signatures

Methods like union, intersection, append, insert, fillna were typed as (other: Index<T>): Index<T>, making it impossible to operate across indices with different literal element types:

const a = new Index([1, 2, 3]);    // Index<1 | 2 | 3>
const b = new Index([3, 4, 5]);    // Index<3 | 4 | 5>
a.union(b);  // TS2345: Index<3|4|5> not assignable to Index<1|2|3>

Changed to second type parameter where the result combines both types:

  • Set ops (union, intersection, symmetricDifference): <U extends Label>(other: Index<U>): Index<T | U>
  • difference: <U extends Label>(other: Index<U>): Index<T> — only returns self's elements
  • append, insert, fillna: <U extends Label>(...): Index<T | U>
  • equals, identical: accept Index<Label>
  • getLoc, contains, getIndexer: accept Label / Index<Label>

Copilot AI and others added 9 commits April 3, 2026 17:09
Establish complete project scaffold for the tsb TypeScript pandas port:

- package.json: tsb package, Bun runtime, Biome + fast-check devDeps
- tsconfig.json: strictest TypeScript (strict, noUncheckedIndexedAccess, exactOptionalPropertyTypes)
- biome.json: all linting rules enabled, zero-warning policy
- bunfig.toml: test coverage enabled, setup preload
- src/index.ts: package entry point with planned export structure
- src/types.ts: core type foundation (Scalar, Label, Axis, DtypeName, etc.)
- tests/setup.ts: global test setup harness
- tests/index.test.ts: hello-world smoke tests proving pipeline works
- .github/workflows/ci.yml: CI with type-check, lint, test, build
- .github/workflows/pages.yml: GitHub Pages deployment pipeline
- playground/index.html: feature roadmap landing page
- AGENTS.md: project conventions for AI coding agents
- CLAUDE.md: Claude Code configuration

Metric: pandas_features_ported = 1 (baseline)

Run: https://github.com/githubnext/tsessebe/actions/runs/23954278176

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…flow

Fix TypeScript type check CI failure: rootDir/tests conflict
Copilot AI assigned Copilot and mrjf Apr 3, 2026
Copilot AI linked an issue Apr 3, 2026 that may be closed by this pull request
Copilot AI and others added 2 commits April 3, 2026 17:52
…s-migration' into copilot/fix-ci-errors

Co-authored-by: mrjf <180956+mrjf@users.noreply.github.com>
…ss and widen method signatures

Agent-Logs-Url: https://github.com/githubnext/tsessebe/sessions/d49c7d0b-404d-4d65-8c30-60f35fe865c7

Co-authored-by: mrjf <180956+mrjf@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix CI errors in testing suite Fix CI typecheck errors: widen Index generic signatures and handle noUncheckedIndexedAccess Apr 3, 2026
Copilot finished work on behalf of mrjf April 3, 2026 18:00
Copilot AI requested a review from mrjf April 3, 2026 18:00
@mrjf mrjf marked this pull request as ready for review April 4, 2026 03:32
@mrjf mrjf merged commit 83b61c9 into main Apr 4, 2026
15 checks passed
@mrjf mrjf deleted the copilot/fix-ci-errors branch April 4, 2026 03:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix CI errors

2 participants