microsoft / microsoft/DefinitelyTyped-tools

dts-critic incorrectly assumes export default of re-export

Open
#504 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
423
Forks
237
Avg merge
18h 18m
Merged PRs (30d)
11

Description

In mongoose-mock:

import mongoose = require('mongoose');
declare var mock: mongoose.Mongoose;
export = mock;

dts-critic incorrectly says that mongoose-mock has an export default because mongoose has an export default. getDtsExportType should either not follow aliases or should be aware of them.

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

Start by locating getDtsExportType and tracing how it handles the mongoose-mock declaration and the re-exported mongoose alias. Reproduce the dts-critic result with the TypeScript snippet in the issue; done means mongoose-mock is no longer reported as having an export default solely because mongoose has one.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.