Skip to content

refactor: Remove @ts-nocheck directive and fix type errors #28

@greynewell

Description

@greynewell

Problem

Line 1 of src/tools/create-supermodel-graph.ts has:

// @ts-nocheck

This disables all type checking for the entire file, which defeats the purpose of using TypeScript and could hide real bugs.

Proper Approach

Instead of disabling all checks:

Option 1: Fix the actual type errors
Investigate what type errors exist and fix them properly.

Option 2: Use targeted @ts-ignore
If there are specific unavoidable issues (like the jq-web library), use targeted ignores:

// @ts-ignore - jq-web doesn't have type declarations
import initJq from 'jq-web';

Option 3: Add type declarations
If the issue is missing types for jq-web, create a declaration file:

// types/jq-web.d.ts
declare module 'jq-web' {
  export default function initJq(): Promise<any>;
}

Benefits

  • Catch type errors at compile time
  • Better IDE autocomplete
  • Safer refactoring
  • Self-documenting code

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions