Skip to content

[TypeScript] Extraction misses optional method signatures (e.g. copy?(), flush?(), handleDrag?())  #2232

Closed

Description

@squid-protocol

Problem:
GitGalaxy drops all 35 optional interface methods in vscode/vscode.d.ts (e.g., copy, flush, handleDrag).

Root Cause:
The func_start regex for TypeScript in language_standards.py expects the parameter list's ( to immediately follow the function name or generic parameters ((?=[ \t\n]{0,50}(?:<(?:[^<>]|<[^<>]*>)*>)?[ \t\n]{0,50}\()). It lacks a \?? before the parenthesis to tolerate the optional modifier ? in method signatures like copy?(source: Uri): void;.

To Reproduce:
Run tests/tools/tree_sitter_accuracy_audit.py --lang typescript and observe copy, flush, etc., from vscode.d.ts in _missing_examples.

Activity

  1. added
    bugUnintended behavior or logic failure in the engine
    core-engineModifications to the central physics and parsing engine
    threat: false-negativeAccuracy tuning: Engine missed a bypass or vulnerability
    on Aug 24, 2026
  2. changed the title [-][TS] Extraction misses optional method signatures (e.g. `copy?()`, `flush?()`, `handleDrag?()`) [/-] [+][TypeScript] Extraction misses optional method signatures (e.g. `copy?()`, `flush?()`, `handleDrag?()`) [/+] on Aug 26, 2026
  3. squid-protocol commented on Aug 26, 2026

    @squid-protocol
    OwnerAuthor

    Resolved by #2245 ("recognize negation-body arrows, optional method signatures, and fix TS audit ground-truth filter"), already merged to main. The func_start regex now tolerates the optional-modifier ? before the parameter list (\?? at language_standards.py:1284 and :1334).

    Verified directly against this issue's own repro strings on current main:

    copy?(source: Uri): void;        -> matches 'copy'
    flush?(): void;                  -> matches 'flush'
    handleDrag?(e: DragEvent): void; -> matches 'handleDrag'
    

    Closing as already fixed.

  4. added this to the v2.4.9 milestone on Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUnintended behavior or logic failure in the enginecore-engineModifications to the central physics and parsing enginethreat: false-negativeAccuracy tuning: Engine missed a bypass or vulnerability

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions