Skip to content

fix: Use boolean instead of Boolean in TypeScript types #203

@Sam-61s

Description

@Sam-61s

Issue

Using Boolean (object wrapper) instead of boolean (primitive type) in type definitions, which violates TypeScript best practices.

Location

lib/types.ts - Lines 27, 36, 38

Why This Matters

  1. Type Safety: Boolean accepts Boolean object wrappers which can cause unexpected behavior
  2. Truthiness Bug: new Boolean(false) is truthy in conditionals, even though it wraps false
  3. Performance: Primitive types are more efficient than object wrappers
  4. Best Practice: TypeScript style guide recommends lowercase primitive types

Solution

Replace all instances of Boolean with boolean:

Fix Applied

All three occurrences have been changed from Boolean to boolean in the TestCase and TestCaseResult type definitions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions