sourcegraph / sourcegraph/scip-typescript

Cross file definition not connected

Open
#409 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

graph/scip-typescript team/graph
Dominant language
TypeScript
Stars
115
Forks
42
Avg merge
12d 22h
Merged PRs (30d)
6

Description

Given the following files:

Sqlite.sys.mjs

export function OpenedConnection() {

}

OpenedConnection.prototype = {
  /**
   * The integer schema version of the database.
   *
   * This is 0 if not schema version has been set.
   *
   * @return String
   */
  getSchemaVersion() {
    return "false"
  },
}

db.sys.mjs

/**
 * @import {OpenedConnection} from "./Sqlite.sys.mjs"
 */


/**
 * @param {OpenedConnection} db
 * @return {String}
 */
export function foo(db) {
    return db.getSchemaVersion();
}

getSchemaVersion() in db.sys.mjs should have a definition in Sqlite.sys.mjs but it ends up with a local defintion

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the case with Sqlite.sys.mjs and db.sys.mjs, then trace how the JSDoc import and getSchemaVersion() reference are resolved across files. Done means the reference in db.sys.mjs connects to the definition in Sqlite.sys.mjs instead of producing a local definition; no test file is named in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.