Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace dtslint with tsd to test .d.ts files #1051

Merged
merged 1 commit into from
Feb 28, 2025

Conversation

minggangw
Copy link
Member

@minggangw minggangw commented Feb 28, 2025

This patch replaces dtslint with tsd for testing .d.ts files, ensuring improved type validation and updated test coverage, including:

  1. Added a new test file, index.test-d.ts, with comprehensive type assertions using tsd.
  2. Removed existing test file, index.d.ts , index.d.ts, test.ts, tsconfig.json and tslint.json that is no longer needed.
  3. Removed dtslint from dependencies for package.json.
  4. Added tsd and @types/node into devDependencies for package.json.

After this patch:

  1. Running npm test will test for .d.ts files.
  2. Running npm install will generate interfaces for .d.ts files.

Fix: #1050

@minggangw minggangw requested a review from Copilot February 28, 2025 08:36

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Overview

This PR replaces dtslint with tsd for testing .d.ts files, ensuring improved type validation and updated test coverage.

  • Added a new test file (index.test-d.ts) with comprehensive type assertions using tsd.
  • Removed an existing test file (test.ts) that is no longer needed.

Reviewed Changes

File Description
test/types/index.test-d.ts New type tests using tsd to validate definitions
test/types/test.ts Removed tests that were causing false negatives

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

test/types/index.test-d.ts:303

  • The action name 'fibonnaci' appears misspelled. Consider renaming it to 'fibonacci' for consistency.
  'fibonnaci'
@minggangw minggangw merged commit 9dc1609 into RobotWebTools:develop Feb 28, 2025
6 checks passed
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.

Replace dtslint with tsd to test .d.ts files
1 participant